Upstream version 11.40.277.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        Do not use the C+J dictionary for Chinese/Japanese segmentation
73        to reduce the data size. Adjust word.txt and a few other files.
74
75    - source/data/brkitr/word_ja.txt (used only on Android)
76        Added for Japanese-specific word-breaking without the C+J dictionary.
77
78 4. Converter changes :
79
80   - convrtrs.txt : Replaced the original by our own that only lists encodings
81     and aliases required by the WHATWG Encoding spec plus a few extra (see
82     the file as to why).
83
84   - Add source/data/mappings/ucmlocal.txt : to list only converters we need.
85
86   - Add new tables per the WHATWG encoding standards for EUC-JP,
87     Shift_JIS and all the single byte encodings.
88     They're generated with scripts : scripts/{eucjp, sjis, single_byte}_gen.sh
89
90   - uconv.patch
91     a. ISO-2022-JP-[1-4] is dropped.
92     b. SCSU, BOCU, ISCII, UTF-7, LMB, ibm42*, ISO-2022-{KR,CN*} and HZ-GB  :
93        converters and detectors are dropped leading to the ~100kB reduction
94        in the code size.
95
96
97 5. Locale changes
98   - patches/locale1.patch :
99       a. Exemplar character set changes for zh*, ja + 9 Indian locales
100       b. Minor fixes for Korean, a few Indic (AmPmMarkers) and
101       others (datetime format)
102
103   - Locale build configuration files: To include the full locale data
104     for Chrome's UI languages and the minimum locale data for other locales,
105     add reslocal.mk or {trns,sprep,rbnf,coll}local.mk files to
106     source/data/{coll,curr,lang.locale,curr,region,translit,zone,rbnf,sprep}.
107
108     This along with #8 (data.build.patch), #3 (brkiter) and #4 (converter)
109     cuts down the data size by ~ 11MB.
110
111   - Run scripts/trim_data.sh : About 2.1MB data size reduction.
112       a. Trim the locale data for Chrome's UI langauges :
113          locales, lang, region, currency
114       b. Trim the locale data for non-UI languages to the bare minimum :
115         ExemplarCharacters, LocaleScript, layout, and the name of the
116         language for a locale in its native language.
117       c. Remove the legacy Chinese character set-based collation
118          (big5han/gb2312han) that don't make any sense and nobdoy uses.
119
120   - android/patch_locale.sh (to be run for Android build only):
121       a. Makes changes to source/data/{curr,region,lang} to exclude these data
122          except the language and script names of zh_Hans and zh_Hant.
123       b. Remove exemplar cities in timezone data (data/zone)
124       c. Keep only the minimal calendar data in data/locales
125
126   - Add tg.txt to source/data/locale source/data/lang to add the minimal locale
127     data necessary for the spellchecker. In both directories, add tg.txt to
128     reslocal.mk
129
130 6. Timezone data update
131   - Grab the latest version of the following timezone data files and
132     put them in source/data/misc.
133
134      metaZones.txt
135      timezoneTypes.txt
136      windowsZones.txt
137      zoneinfo64.txt
138
139    As of August 2014, the latest version is 2014f and the above files
140    are available at
141    http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2014f/44/
142
143 7. Transliterator customization
144
145    - Also add css3transform.txt to source/data/trnslit.
146    - Put the following line in trnslocal.mk
147
148      TRANSLIT_SOURCE=css3transform.txt
149
150 8. Build-related changes
151
152   - patches/wpo.patch
153     Upstream bugs : http://bugs.icu-project.org/trac/ticket/8043
154                     http://bugs.icu-project.org/trac/ticket/5701
155   - patches/vscomp.patch for building with Visual Studio on Windows.
156      a. do not use WINDOWS_LOCALE_API in locmap.c
157      b. do not redefine stringpiece::npos
158      c. fix a Windows build failure with U_USING_ICU_NAMESPACE=0
159         upstream bug: http://bugs.icu-project.org/trac/ticket/10486
160         fixed in ICU 53)
161      d. Explicitly use Windows 'A' API when argument is an LPSTR in wintz.c
162         upstream bug : http://bugs.icu-project.org/trac/ticket/10870
163
164   - patches/data.build.patch :
165       Remove unnecessary resources : invuca, unames, collator source, stringprep
166   - patches/data.build.win.patch :
167       Windows-only data build patch.
168
169   - patches/clang_win.patch :
170     Take care of 3 warnings from clang and MSVC 2013.
171     upstream bug : http://bugs.icu-project.org/trac/ticket/11102
172
173 9. Pre-built data files are checked in with the following steps on Linux:
174
175     a. Make a icu data build directory outside the Chromium source tree
176        and cd to that directory.
177     b. Run
178
179       ${CHROME_ICU_TREE_TOP}/source/runConfigureICU Linux --disable-layout
180
181     c. Run 'make'
182     d. 'make' will fail in the 1st pass. Copy
183        ${CHROME_ICU_TREE_TOP}/source/data/in/coll/invuca.icu
184        to {BUILD_DIR_ROOT}/data/out/build/icudt52l/coll and re-run 'make'
185        in {BUILD_DIR_ROOT}/data.
186
187     e. 'make' will fail again when pkgdata looks for css3transform.res. Edit
188     data/out/tmp/icudata.lst to replace 'css3transform.res' with 'root.res'.
189     (see http://bugs.icu-project.org/trac/ticket/10570 ) and run 'make' again.
190
191
192     - source/data/in/icudtl.dat : Built on Linux with all the patches
193       above applied. icudt52l.dat is generated in
194       {BUILD_DIR_ROOT}/data/out/tmp and copied to the above location with a
195       version number (52) dropped.
196
197
198     - {mac,linux}/icudtl_dat.S : Built on Linux with all the
199       patches above (except android/brkitr.patch) applied and checked in.
200       This file will be generated in {BUILD_DIR_ROOT}/data/out/tmp as
201       icudt52l_dat.S, but '52' is dropped while copying.
202
203       mac/icudtl_dat.S is identical to linux/icudtl_dat.S except for
204       the header portion. With "linux/icudtl_dat.S" in its place,
205       run scripts/make_mac_assembly.sh to generate it.
206
207     - android/icudtl_dat.S : Built on Linux with all the patches above and
208       android/brkitr.patch applied and android/patch_locale.sh executed.
209       '52' is dropped from the name generated in the build tree.
210
211     - android/icudtl.dat : Generated as icudt52l.dat in
212       {BUILD_DIR_ROOT}/data/out/tmp along with icudt52l_dat.S and
213       copied to the above location with '52' dropped in its name.
214
215     - windows/icudt.dll (by default, we set icu_use_icu_data_flag to 1
216       and don't use this file.)
217
218       a. check out a clean copy of icu52  from the upstream on Windows
219          outside the Chrome tree.
220
221         $ svn export --native-eol LF http://source.icu-project.org/repos/icu/icu/tags/release-52-1 ${SEPARATE_ICU_ROOT}/icu52
222
223       b. copy ${CHROME_ICU_ROOT}/source/data/in/icudtl.dat to
224          ${SEPARATE_ICU_ROOT}/source/data/in/icudt52l.dat
225       c. copy ${CHROME_ICU_ROOT}/source/data/makedata.mak to
226          ${SEPARATE_ICU_ROOT}/source/data/makedata.mak
227       c. In Visual Studio, open source/allinone/allinone.sln solution
228          in ${SEPARATE_ICU_ROOT}
229       d. Build 'makedata' target
230       e. icudt52.dll will be generated in ${SEPARATE_ICU_ROOT}/bin
231       f. Copy that icudt52.dll to ${CHROME_ICU_ROOT}/windows/icudt.dll
232          and check that in.
233
234
235 10. Change export of U_ICUDATA_ENTRY_POINT from U_IMPORT to U_EXPORT.
236     - patches/declspec.patch
237
238 11. Cherry-pick an upstream patch to fix a bug in bidi.
239     - patches/bidi.patch
240     - upstream bug : http://bugs.icu-project.org/trac/ticket/11054
241
242 12. Apply the following patches for regex
243    - patches/regex.patch and patches/regex2.patch
244    - upstream bugs : http://bugs.icu-project.org/trac/ticket/11369
245                      http://bugs.icu-project.org/trac/ticket/11370
246                      http://bugs.icu-project.org/trac/ticket/11371
247