1 -*-mode: text; coding: utf-8;-*-
3 Copyright (C) 2002-2016 Free Software Foundation, Inc.
4 See the end of the file for license conditions.
6 Importing a new Unicode Standard version into Emacs
7 -------------------------------------------------------------
9 Emacs uses the following files from the Unicode Character Database
17 . NormalizationTest.txt
19 First, these files need to be copied into admin/unidata/, and then
20 Emacs should be rebuilt for them to take effect. Rebuilding Emacs
21 updates several derived files elsewhere in the Emacs source tree,
22 mainly in lisp/international/.
24 When Emacs is rebuilt for the first time after importing the new
25 files, pay attention to any warning or error messages. In particular,
26 admin/unidata/unidata-gen.el will complain if UnicodeData.txt defines
27 new bidirectional attributes of characters, because unidata-gen.el,
28 bidi.c and dispextern.h need to be updated in that case; failure to do
29 so will cause aborts in redisplay.
31 Next, review the changes in UnicodeData.txt vs the previous version
32 used by Emacs. Any changes, be it introduction of new scripts or
33 addition of codepoints to existing scripts, might need corresponding
34 changes in the data used for filling the category-table, case-table,
35 and char-width-table. The additional scripts should cause automatic
36 updates in charscript.el, but it is a good idea to look at the results
37 and see if any changes in admin/unidata/blocks.awk are required.
39 Any new scripts added by UnicodeData.txt will also need updates to
40 script-representative-chars defined in fontset.el, and also the list
41 of OTF script tags in otf-script-alist, whose source is on this page:
43 https://www.microsoft.com/typography/otspec/scripttags.htm
45 Other databases in fontset.el might also need to be updated as needed.
47 The function 'ucs-names', defined in lisp/international/mule-cmds.el,
48 might need to be updated because it knows about used and unused ranges
49 of Unicode codepoints, which a new release of the Unicode Standard
52 Finally, test normalization functions against NormalizationTests.txt,
53 in the test/ directory run:
55 make lisp/international/ucs-normalize-tests
57 See commentary in test/lisp/international/ucs-normalize-tests.el
58 regarding failing lines.
60 Problems, fixmes and other unicode-related issues
61 -------------------------------------------------------------
63 Notes by fx to record various things of variable importance. Handa
64 needs to check them -- don't take too seriously, especially with
65 regard to completeness.
67 * SINGLE_BYTE_CHAR_P returns true for Latin-1 characters, which has
68 undesirable effects. E.g.:
69 (multibyte-string-p (let ((s "x")) (aset s 0 ?£) s)) => nil
70 (multibyte-string-p (concat [?£])) => nil
71 (text-char-description ?£) => "M-#"
73 These examples are all fixed by the change of 2002-10-14, but
74 there still exist questionable SINGLE_BYTE_CHAR_P in the
75 code (keymap.c and print.c).
77 * Rationalize character syntax and its relationship to the Unicode
78 database. (Applies mainly to symbol an punctuation syntax.)
80 * Fontset handling and customization needs work. We want to relate
81 fonts to scripts, probably based on the Unicode blocks. The
82 presence of small-repertoire 10646-encoded fonts in XFree 4 is a
83 pain, not currently worked round.
85 With the change on 2002-07-26, multiple fonts can be
86 specified in a fontset for a specific range of characters.
87 Each range can also be specified by script. Before using
88 ISO10646 fonts, Emacs checks their repertories to avoid such
89 fonts that don't have a glyph for a specific character.
91 fx has worked on fontset customization, but was stymied by
92 basic problems with the way the default face is dealt with
93 (and something else, I think). This needs revisiting.
95 * Work is also needed on charset and coding system priorities.
97 * The relevant bits of latin1-disp.el need porting (and probably
98 re-naming/updating). See also cyril-util.el.
100 * Quail files need more work now the encoding is largely irrelevant.
102 * What to do with the old coding categories stuff?
104 * The preferred-coding-system property of charsets should probably be
105 junked unless it can be made more useful now.
107 * find-multibyte-characters needs looking at.
109 * Implement Korean cp949/UHC, BIG5-HKSCS and any other important missing
112 * Lazy-load tables for unify-charset somehow?
114 Actually, Emacs clears out all charset maps and unify-map just
115 before dumping, and they are loaded again on demand by the
116 dumped emacs. But, those maps (char tables) generated while
117 temacs is running can't be removed from the dumped emacs.
119 * iso-2022 charsets get unified on i/o.
121 With the change on 2003-01-06, decoding routines put the 'charset'
122 property onto decoded text, and iso-2022 encoder pay attention
123 to it. Thus, for instance, reading and writing by
124 iso-2022-7bit preserve the original designation sequences.
125 The property name 'preferred-charset' may be better?
127 We may have to utilize this property to decide a font.
129 * Revisit locale processing: look at treating the language and
130 charset parts separately. (Language should affect things like
131 spelling and calendar, but that's not a Unicode issue.)
133 * Handle Unicode combining characters usefully, e.g. diacritics, and
134 handle more scripts specifically (à la Devanagari). There are
135 issues with canonicalization.
137 * We need tabular input methods, e.g. for maths symbols. (Not
138 specific to Unicode.)
140 * Need multibyte text in menus, e.g. for the above. (Not specific to
141 Unicode -- see Emacs etc/TODO, but now mostly works with gtk.)
143 * Populate char-width-table correctly for Unicode characters and
144 worry about what happens when double-width charsets covering
145 non-CJK characters are unified.
147 * There are type errors lurking, e.g. in
148 Fcheck_coding_systems_region. Define ENABLE_CHECKING to find them.
150 * Old auto-save files, and similar files, such as Gnus drafts,
151 containing non-ASCII characters probably won't be re-read correctly.
157 Most Emacs source files are encoded in UTF-8 (or in ASCII, which is a
158 subset), but there are a few exceptions, listed below. Perhaps
159 someday many of these files will be converted to UTF-8, for
160 convenience when using tools like 'grep -r', but this might need
161 nontrivial changes to the build process.
165 These are verbatim copies of files taken from external sources.
166 They haven't been converted to UTF-8.
168 leim/CXTERM-DIC/4Corner.tit
169 leim/CXTERM-DIC/ARRAY30.tit
170 leim/CXTERM-DIC/ECDICT.tit
171 leim/CXTERM-DIC/ETZY.tit
172 leim/CXTERM-DIC/PY-b5.tit
173 leim/CXTERM-DIC/Punct-b5.tit
174 leim/CXTERM-DIC/QJ-b5.tit
175 leim/CXTERM-DIC/ZOZY.tit
176 leim/MISC-DIC/CTLau-b5.html
177 leim/MISC-DIC/cangjie-table.b5
181 These are verbatim copies of files taken from external sources.
182 They haven't been converted to UTF-8.
184 leim/CXTERM-DIC/CCDOSPY.tit
185 leim/CXTERM-DIC/Punct.tit
186 leim/CXTERM-DIC/QJ.tit
187 leim/CXTERM-DIC/SW.tit
188 leim/CXTERM-DIC/TONEPY.tit
189 leim/MISC-DIC/CTLau.html
190 leim/MISC-DIC/pinyin.map
191 leim/MISC-DIC/ziranma.cin
195 This file contains non-ASCII characters in unibyte strings. When
196 editing a keyboard layout it's more convenient to see 'é' than
197 '\202', and the MS-DOS compiler requires the single byte if a
198 backslash escape is not being used.
204 This file is externally generated from leim/MISC-DIC/cangjie-table.b5
205 by Big5->CNS converter. It hasn't been converted to UTF-8.
207 leim/MISC-DIC/cangjie-table.cns
211 SKK-JISYO.L is a verbatim copy of a file taken from an external source.
212 It hasn't been converted to UTF-8.
214 leim/SKK-DIC/SKK-JISYO.L
218 This is a verbatim copy of a file taken from an external source.
219 It hasn't been converted to UTF-8.
221 admin/charsets/mapfiles/cns2ucsdkw.txt
225 This file switches between CJK charsets, which is not encoded in UTF-8.
229 Each of these files contains just one CJK charset, but Emacs
230 currently has no easy way to specify set-charset-priority on a
231 per-file basis, so converting any of these files to UTF-8 might
232 change the file's appearance when viewed by an Emacs that is
233 operating in some other language environment.
235 etc/tutorials/TUTORIAL.ja
236 lisp/international/ja-dic-cnv.el
237 lisp/international/ja-dic-utl.el
238 lisp/international/kinsoku.el
239 lisp/international/kkc.el
240 lisp/international/titdic-cnv.el
241 lisp/language/japan-util.el
242 lisp/language/japanese.el
243 lisp/leim/quail/cyril-jis.el
244 lisp/leim/quail/hanja-jis.el
245 lisp/leim/quail/japanese.el
246 lisp/leim/quail/py-punct.el
247 lisp/leim/quail/pypunct-b5.el
249 This file contains just Chinese characters, and has same problem.
250 Also, it contains characters that cannot be encoded in UTF-8.
252 lisp/international/titdic-cnv.el
256 These files contain characters that cannot be encoded in UTF-8.
258 lisp/language/ethio-util.el
259 lisp/language/ethiopic.el
260 lisp/language/ind-util.el
261 lisp/language/tibet-util.el
262 lisp/language/tibetan.el
263 lisp/leim/quail/ethiopic.el
264 lisp/leim/quail/tibetan.el
268 These files contain binary data, and are not text files.
269 Some of the entries in this list are patterns, and stand for any
270 files with the listed extension.
280 etc/package-keyring.gpg
282 nextstep/GNUstep/Emacs.base/Resources/emacs.tiff
286 This file is part of GNU Emacs.
288 GNU Emacs is free software: you can redistribute it and/or modify
289 it under the terms of the GNU General Public License as published by
290 the Free Software Foundation, either version 3 of the License, or
291 (at your option) any later version.
293 GNU Emacs is distributed in the hope that it will be useful,
294 but WITHOUT ANY WARRANTY; without even the implied warranty of
295 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
296 GNU General Public License for more details.
298 You should have received a copy of the GNU General Public License
299 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.