Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / icu / README.chromium
1 Name: icu
2 URL: http://site.icu-project.org/
3 Version: 52.1
4 License: MIT
5 Security Critical: yes
6
7 Description:
8 This directory contains the source code of ICU 52.1 for C/C++
9
10 1. It was obtained with the following:
11
12     $ svn export --native-eol LF http://source.icu-project.org/repos/icu/icu/tags/release-52-1 icu52
13
14   The following directories we don't use are removed:
15
16    - as_is
17    - packaging
18    - source/layout
19    - source/layoutex
20    - source/data/xml
21
22   patches/configure.patch is applied to get runConfigureICU work in the 
23   icudata generation step without layout and layoutex directory by removing the
24   corresponding Makefile's from ac_config variable.
25
26 2. Apply the following patch for platform related headers (putilimpl.h and 
27    others).
28
29   - patches/putil.patch for Android, QNX and newlib(NaCl-newlib).
30     Upstream bug for Android : http://bugs.icu-project.org/trac/ticket/10478
31     Upstream bug for QNX : http://bugs.icu-project.org/trac/ticket/10811
32     Upstream bug for newlib : http://bugs.icu-project.org/trac/ticket/10873
33
34  - patches/platform_nacl.patch to add U_PF_NATIVE_CLIENT
35    Upstream bug : http://bugs.icu-project.org/trac/ticket/11033
36
37
38 3. Breakiterator patches
39
40    - Apply patches/brkitr.patch 
41      * word.txt 
42        a. Move full stops (U+002E, U+FF0E) from MidNumLet to MidNum so that
43           FQDN labels can be split at '.'
44        b. Move fullwidth digits (U+FF10 - U+FF19) from Ideographic to Numeric.
45           See http://unicode.org/cldr/trac/ticket/6555 
46      * line.txt
47        a. Use Japanese rules for all locales because Japanese tailoring only
48           affects Japanese specific characters.
49           See http://unicode.org/cldr/trac/ticket/3974
50        b. Minor changes in CL, OP and IS definitions to handle 'comma-variants'
51           more consistenly.
52           See http://unicode.org/cldr/trac/ticket/6557
53        c. Fix line breaking for Chinese characters and quotation marks
54           See http://unicode.org/cldr/trac/ticket/4200 and 
55               http://crbug.com/39779
56              
57
58    - Add a new file brklocal.mk (copied from brkfiles.mk) with line_ja.txt
59      and word_POSIX.txt dropped from the build list.
60
61    - Apply patches/khmer-dictbe.patch and put in a smaller Khmer dictionary
62      (source/data/brkitr/khmerdict.txt) obtained from 
63      http://bugs.icu-project.org/trac/ticket/9451
64
65    - Add several common Chinese words that were dropped previously to
66      source/data/cjdict/brkitr/cjdict.txt
67      patch: patches/cjdict.patch
68      upstream bug: http://bugs.icu-project.org/trac/ticket/10888
69
70
71    - android/brkitr.patch (to be applied for Android build only) :
72        Reverts some changes about Chinese/Japanese segmentation rules in
73        patches/brkitr.patch to reduce binary size for Android.
74
75 4. Converter changes : 
76
77   - converters.patch : 
78      a. revises existing mapping tables
79      b. Remove a lot of unused aliases in the converter alias table
80         (source/data/mappings/convrtrs.txt ) leading to 40kB size reduction.
81
82   - Add source/data/mappings/ucmlocal.txt : to list only converters we need.
83   - Add two new tables per WHATWG encoding standards for EUC-JP and CP866.
84     They're generated with scripts/{eucjp, ibm866}_gen.sh. 
85   - Add three 'fake' tables for ISO-2022-CN(-Ext) : noop-*.ucm.
86
87   - uconv.patch 
88     a. ucnv2022 uses 3 fake tables for ISO-2022-CN(-Ext) instead of two
89        huge tables.
90     b. ISO-2022-JP-[1-4] is dropped.
91     c. SCSU, BOCU, ISCII, UTF-7 conversion is diabled leading to 
92        the 47kB reduction in the code size.
93
94 5. Locale changes
95   - patches/locale1.patch :
96       a. Exemplar character set changes for zh*, ja + 9 Indian locales
97       b. Minor fixes for Korean, a few Indic (AmPmMarkers) and 
98       others (datetime format)
99
100   - Locale build configuration files: To include the full locale data
101     for Chrome's UI languages and the minimum locale data for other locales,
102     add reslocal.mk or {trns,sprep,rbnf,coll}local.mk files to
103     source/data/{coll,curr,lang.locale,curr,region,translit,zone,rbnf,sprep}.
104
105     This along with #8 (data.build.patch), #3 (brkiter) and #4 (converter) 
106     cuts down the data size by ~ 11MB.
107
108   - Run scripts/trim_data.sh : About 2.1MB data size reduction.
109       a. Trim the locale data for Chrome's UI langauges :
110          locales, lang, region, currency
111       b. Trim the locale data for non-UI languages to the bare minimum :
112         ExemplarCharacters, LocaleScript, layout, and the name of the
113         language for a locale in its native language.
114       c. Remove the legacy Chinese character set-based collation 
115          (big5han/gb2312han) that don't make any sense and nobdoy uses.
116
117   - android/patch_locale.sh (to be run for Android build only):
118       a. Makes changes to source/data/{curr,region,lang} to exclude these data
119          except the language and script names of zh_Hans and zh_Hant.
120       b. Remove exemplar cities in timezone data (data/zone)
121       c. Keep only the minimal calendar data in data/locales
122  
123   - Add tg.txt to source/data/locale source/data/lang to add the minimal locale
124     data necessary for the spellchecker. In both directories, add tg.txt to
125     reslocal.mk
126
127 6. Timezone data update
128   - Grab the latest version of the following timezone data files and
129     put them in source/data/misc.
130
131      metaZones.txt
132      timezoneTypes.txt
133      windowsZones.txt
134      zoneinfo64.txt
135
136    As of April 2014, the latest version is 2014b and the above files
137    are available at
138    http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2014b/44/
139
140 7. Transliterator customization
141
142    - Also add css3transform.txt to source/data/trnslit.
143    - Put the following line in trnslocal.mk
144
145      TRANSLIT_SOURCE=css3transform.txt
146
147 8. Build-related changes
148
149   - patches/wpo.patch
150     Upstream bugs : http://bugs.icu-project.org/trac/ticket/8043
151                     http://bugs.icu-project.org/trac/ticket/5701
152   - patches/vscomp.patch for building with Visual Studio on Windows.
153      a. do not use WINDOWS_LOCALE_API in locmap.c
154      b. do not redefine stringpiece::npos
155      c. fix a Windows build failure with U_USING_ICU_NAMESPACE=0
156         upstream bug: http://bugs.icu-project.org/trac/ticket/10486 
157         fixed in ICU 53)
158      d. Explicitly use Windows 'A' API when argument is an LPSTR in wintz.c
159         upstream bug : http://bugs.icu-project.org/trac/ticket/10870
160
161   - patches/data.build.patch :
162       Remove unnecessary resources : invuca, unames, collator source, stringprep
163   - patches/data.build.win.patch :
164       Windows-only data build patch.
165
166 9. Pre-built data files are checked in with the following steps on Linux:
167
168     a. Make a icu data build directory outside the Chromium source tree 
169        and cd to that directory.
170     b. Run 
171
172       ${CHROME_ICU_TREE_TOP}/source/runConfigureICU Linux --disable-layout
173
174     c. Run 'make'
175     d. 'make' will fail in the 1st pass. Copy 
176        ${CHROME_ICU_TREE_TOP}/source/data/in/coll/invuca.icu
177        to {BUILD_DIR_ROOT}/data/out/build/icudt52l/coll and re-run 'make'
178        in {BUILD_DIR_ROOT}/data.
179
180     e. 'make' will fail again when pkgdata looks for css3transform.res. Edit
181     data/out/tmp/icudata.lst to replace 'css3transform.res' with 'root.res'.
182     (see http://bugs.icu-project.org/trac/ticket/10570 ) and run 'make' again.
183
184
185     - source/data/in/icudtl.dat : Built on Linux with all the patches
186       above applied. icudt52l.dat is generated in
187       {BUILD_DIR_ROOT}/data/out/tmp and copied to the above location with a
188       version number (52) dropped.
189
190
191     - {mac,linux}/icudtl_dat.S : Built on Linux with all the
192       patches above (except android/brkitr.patch) applied and checked in.
193       This file will be generated in {BUILD_DIR_ROOT}/data/out/tmp as
194       icudt52l_dat.S, but '52' is dropped while copying.
195
196       mac/icudtl_dat.S is identical to linux/icudtl_dat.S except for
197       the header portion. With "linux/icudtl_dat.S" in its place, 
198       run scripts/make_mac_assembly.sh to generate it.
199
200     - android/icudtl_dat.S : Built on Linux with all the patches above and
201       android/brkitr.patch applied and android/patch_locale.sh executed.
202       '52' is dropped from the name generated in the build tree.
203
204     - android/icudtl.dat : Generated as icudt52l.dat in
205       {BUILD_DIR_ROOT}/data/out/tmp along with icudt52l_dat.S and
206       copied to the above location with '52' dropped in its name.
207
208     - windows/icudt.dll (by default, we set icu_use_icu_data_flag to 1
209       and don't use this file.) 
210
211       a. check out a clean copy of icu52  from the upstream on Windows
212          outside the Chrome tree.
213
214         $ svn export --native-eol LF http://source.icu-project.org/repos/icu/icu/tags/release-52-1 ${SEPARATE_ICU_ROOT}/icu52
215
216       b. copy ${CHROME_ICU_ROOT}/source/data/in/icudtl.dat to 
217          ${SEPARATE_ICU_ROOT}/source/data/in/icudt52l.dat
218       c. copy ${CHROME_ICU_ROOT}/source/data/makedata.mak to
219          ${SEPARATE_ICU_ROOT}/source/data/makedata.mak
220       c. In Visual Studio, open source/allinone/allinone.sln solution
221          in ${SEPARATE_ICU_ROOT}
222       d. Build 'makedata' target 
223       e. icudt52.dll will be generated in ${SEPARATE_ICU_ROOT}/bin
224       f. Copy that icudt52.dll to ${CHROME_ICU_ROOT}/windows/icudt.dll 
225          and check that in.
226
227
228 10. Change export of U_ICUDATA_ENTRY_POINT from U_IMPORT to U_EXPORT.
229     - patches/declspec.patch