Check in the pristine copy of ICU 52.1

The following directories we don't use are removed:

as_is
packaging
source/layout
source/layoutex

Better plural formatting, updated locale data, the segmentation support
for Chinese, Japanese (our code was upstreamed) and Khmer/Lao are among
many improvements. EcmaScript I18N API also need this update to be compliant
to the spec.

Because codereview.chromium.org keeps giving me a 500 error when uploading
the CL, so this initial check-in is done directly with svn.

BUG=132145
TEST=None


git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@259715 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Copy README.chromium from icu46

To keep track of what patches/steps from ICU 46 to apply to or to drop in 
ICU 52, copy the contents of README.chromium from ICU 46. 

Entries in the file will be removed, revised or kept as it is depending on
whether ICU 52 need the corresponding patch or not. 

BUG=132145
TEST=None


git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@259826 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Update gyp and isolate files for ICU 52.1

Update icu.gyp and related files to list C/C++ source files and header files.

Besides, HAVE_DLOPEN is set to 0 explicitly in icu.gyp. It's 0 by default
in ICU 4.6.1 but is 1 by default in ICU 52.1, but we don't need it. (it's only
necessary for ICU plugins that Chromium does not use).

I also applied https://codereview.chromium.org/218153002/ (Nico's CL to
simplify icu.gyp).

BUG=132145
TEST=None
R=mark@chromium.org, thakis@chromium.org

Review URL: https://codereview.chromium.org/212623010

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@260941 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
create patches directory in icu52

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@261227 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Copy ICU patches from icu46 tree to icu52 tree

This is to preserve the revision history. They'll be removed or
revised as neessary.

Manually committed to svn because codereview.chromium.org is malfunctioning.

BUG=132145
TEST=NONE



git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@261238 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Copy the remaining icu46 patches to preserve the history

BUG=132145
TEST=NONE

Review URL: https://codereview.chromium.org/224133003

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@261498 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
ICU 52 local changes part1

1. Remove all the obsolete patches. There are lots of them because most of
local patches to ICU 4.6.1 have either been accepted or become obsolete.
The largest local patch removed is our patches for CJ word breaker because
they were upstreamed.

Android didn't apply the CJK word breaker patch to ICU 4.6 to reduce the
data size. In a follow-up CL, we'll have an Android-specific change for this issue.

Besides, we don't include patches for files we locally add because the
patches for new files are redundant. Instead, they're mentioned in
README.chromium.

2. We don't need platform-specific headers any more (pmac, plinux, pwin, etc).
They're combined into a single file and all platforms we care about are
well-supported except for one issue on Android/QNX. putil.patch takes care
of it.


3. Breakiterator patches for a few remaining issues. We also use
a much smaller Khmer dictionary (upstream fix pending).

4. Converter
  - Introduced two WHATWG-encoding-standard-compliant mapping tables
    are added (derived directly from the spec with a script) for EUC-JP
    and CP866
  - Disabled various non-HTML5-encodings such as SCSU,BOCU, UTF-7, CESU-8
    saving ~30kB in the code size. Even though we link statically, they're
    still pulled in as a part of uconv.
  - Disabled ISO-2022-JP-[1-4] in ucnv2022.c
  - Removed a number of encoding alias entries in the alias table
    leading to ~40kB data size reduction.

5. Locale data : Haven't yet updated. We need to trim them substantially.

6. Unihan collation removal is now done with a script (scripts/remove_unihan.sh)

7. Updated timezone data to the latest (2014b) as of today.

8. Customized transliterator for Greek uppercasing

9. Updated data build related patches. The windows data build patch has yet
   to be updated.

10. The updated ICU data file/assembly source files are not included in this
    CL. They'll be updated in a separate CL.
    With all the size reduction changes applied, the data size went down
    from > 23MB to 12.4MB. However, it's still 2.5MB larger than ICU 4.6.1
    data. The locale data trimming will bring it down further.

11. Update README.chromium accordingly. The only exceptions are
item #5 and the android entry in item #3 (breakiterator. see #1 above)



BUG=259715,76328
TEST=Following the procedure outlined in README.chromium, one can build
the icu data file.

R=jsbell@chromium.org, mark@chromium.org

Review URL: https://codereview.chromium.org/224943002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@262192 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
ICU 52 local change part 2

Update patches/local1.patch

1. Drop a lot of changes that have been upstreamed since ICU 4.6.x
2. Keep and update exemplar character set for zh*, ja, Indic locales
3. Make timezone names more consistent. Most of the inconsistencies have
   been fixed in the upstream, but there are still some remaining while
   others were fixed after ICU 52.1
4. Minor fixes in other locale data : Date/interval formats, 
   AmPm markers (Indic locales), etc.

BUG=76328
TEST=None (when rolled, net_unittests:*IDN* passes).
TBR=mark

Review URL: https://codereview.chromium.org/232773005

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@263295 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove source/data/xml 

We don't use the xml version of CLDR data. We use the ICU's txt format
data (same contents) in source/data.

BUG=132145
TEST=NONE

Review URL: https://codereview.chromium.org/239513016

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@264579 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Trim ICU data to reduce the download size/memory usage

Add a shell script to trim the ICU data further : trim_data.sh along with
locale list files.  The script does the following:

1. Remove the display names of languages NOT listed in Chrome's Accept-Language
   list. (800kB)
2. Minimize the locale data for locales listed in the A-L list that are
   not a UI locale in Chrome. For those locales, exemplar characters,
   the display name in the native language and layout direction are included.
   (640kB)
3. Filter the region data to drop numeric region display names other than 419
   (Latin-America). (50kB)
4. Filter the currency data (display name and plurals) for historic currencies.
   (200kB)

This CL also checks in icudtl.dat (source/data/in) and
icudt_dat.S (mac and linux). Note that I dropped '52' (the version number)
in the assembly source file name and icu.gyp was adjusted accordingly.

With all these changes, icudtl.dat is ~ 800kB larger than that in ICU 4.6.
The 7z compression (as used by the installer) makes the size difference
go down to ~ 130kB.

BUG=132145
TEST=The icudtl.dat (uncompressed) is about 10.7MB instead of 12.4MB without this CL.
R=mark@chromium.org

Review URL: https://codereview.chromium.org/239543018

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@264811 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove {big5,gb2312}han collation data

1. {big5,gb2312}han collation data is not used by anybody because they're
useless as a sorting order.

  Add a function to trim_data.sh to remove them from zh.txt

2. Remove remove_unihan.sh and add back unihan rules to coll/{zh,ja,ko}.txt.
In ICU 52, tools/genrb does NOT include unihan collation by default so that 
we don't have to bother to remove it from the rule files.

3. Remove obsolete patch files (locale[23].patch)

4. Add LICENSE file (converted from license.html)

5. Update README.chromium accordingly.

6. Check in the updated data file/assembly files.

The net saving in icudtl.dat is ~ 220kB.


BUG=132145
TEST=icudtl.dat is 10576480
TBR=mark

Review URL: https://codereview.chromium.org/243763002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@264857 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add the original mk (make) files for ICU 52

In the initial check-in of the ICU 52 tree, some *mk files were not 
checked in. 

BUG=132145
TEST=NONE

Review URL: https://codereview.chromium.org/245383002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@265011 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Trim unit* sections in data/locales/*

Add 'filter_locale_data' function to trim_data.sh

Chromium/Blink do not use most of unit* sections in locale data. Keep
only duration and compound sub-sections. 

Update the icudtl.dat and two assembly source files for Mac/Linux.

It saves ~200kB (uncompressed). 7z-compressed size reduction is 34kB.

With all these changes (up to this CL) applied, the net increase of the ICU data from icu 46 to 52 is 49kB with 7z-compressed.
(3,070,246 vs  3,021,457) and ~ 390kB uncompressed (10,370,656 vs 9,980,368 ). 

BUG=132145
TEST=None.
TBR=mark

Review URL: https://codereview.chromium.org/247663002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@265354 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Check in the pre-built ICU data files for Android

- Update brkitr.patch to apply to ICU 52. ICU 52 has the CJK segmenter
  built-in. Fortunately, we just have to change the brkitr data without
  touching the code.
- Update patch_locale.sh for additional data trimming (calendar and
  zone - exemplar cities).

- Apply the two patches locally (the result is not landed in the tree) and
  build the icu data (icudtl.dat and icudtl_dat.S).

The size of icudtl.dat with zip compression increased by
125kB (1,998,805 vs 1,870,219) and the uncompressed icudtl.dat got bigger
by 463kB (6,049,360 vs 5,575,648)

BUG=132145
TEST=None
R=andrewhayden@chromium.org, wangxianzhu@chromium.org

Review URL: https://codereview.chromium.org/248043003

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@265785 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add the solution file for icu build on Windows

This will not be used in a regular Chromium/Blink build, but will
only be used to generate icudt.dll (pre-built icu dll file) from
icudtl.dat. 

Note that icudt.dll is not used in the default build configuration (with icu_use_data_file_flag=1) but GN build still uses it.


BUG=132145
TEST=NONE

Review URL: https://codereview.chromium.org/255683002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@265971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add ro_MD.txt to collocal.mk and rebuild icudtl.dat

Somehow icupkg (used in generating icudtl.dll on Windows) complains that
coll/ro_MD required for coll/ro is missing in icudtl.dat. Because ro_MD is 
ust an empty alias and it's not a size issue, I'm adding it to silence 
icupkg. (will check with the upstream about this unexpected dependencies).

Note that I'm not updating the assembly source files and icudtl.dat for
Android because it should not matter to them.

BUG=132145
TEST=On Windows, makedata  in allinone.snl does not complain.

Review URL: https://codereview.chromium.org/255673005

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@265987 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add icudt.dll for Windows

1. Generate and add windows/icudt.dll with the procedure outlined
in README.chromium. It uses a out-of-tree copy of the upstream ICU
along with our custom-built icudtl.dat and a locally modified version
of makedata.mak.

We used to have a separate build/ directory for VS solution/project files
to build icudtl.dll. Maintaining them is rather cumbersom now that we
want to update our ICU (major version changes) more frequently. 

Note that icudt.dll is not used by default (icu_use_data_file_flag=1). 
The GN build still uses it by default and we should not break that build.

2. Add scripts/make_mac_assembly.sh to simplify the generation of the icu
data assembly source file for Mac.

3. Update README.chromium accordingly.

This CL was uploaded and reviewed at 

https://codereview.chromium.org/255943004/

Due to a malfunction at codereview.chromium.org, I'm landing this CL 
manually.

BUG=132145
TEST=None until icu is rolled to this version.


git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@266601 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add icudt.dll for Windows

1. Generate and add windows/icudt.dll with the procedure outlined
in README.chromium. It uses a out-of-tree copy of the upstream ICU
along with our custom-built icudtl.dat and a locally modified version
of makedata.mak.

We used to have a separate build/ directory for VS solution/project files
to build icudtl.dll. Maintaining them is rather cumbersom now that we
want to update our ICU (major version changes) more frequently. 

Note that icudt.dll is not used by default (icu_use_data_file_flag=1). 
The GN build still uses it by default and we should not break that build.

2. Add scripts/make_mac_assembly.sh to simplify the generation of the icu
data assembly source file for Mac.

3. Update README.chromium accordingly.

This CL was uploaded and reviewed at 

https://codereview.chromium.org/255943004/

Due to a malfunction at codereview.chromium.org, I'm landing this CL 
manually in two parts. 
This check-in is the 2nd part of the CL dealing with #2 and #3
above.

BUG=132145
TEST=None until icu is rolled to this version.


git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@266602 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Fix two more compile errros on Windows.

umutex.h and wintz.c have two compile errors on Windows.  The former
issue was fixed in the upstream, but the latter is not. I reported
the latter to the upstream (see README.chromium)

BUG=132145
TEST=Can build on Windows with icu52.
R=mark@chromium.org
TBR=mark@chromium.org

Review URL: https://codereview.chromium.org/256183002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@266901 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Update EUC-JP per WHATWG encoding spec

- Add missing half-width kana entries (omitted by mistake)
- Drop 'extra' decoding only mapping. See
  https://www.w3.org/Bugs/Public/show_bug.cgi?id=25266
- Regenerate icu data files (*dat and assembly source files) for Linux,
  Mac, Windows and Android.  (they'll not be shown at
  codereview.chromium.org because they're too large).

BUG=132145,78847
TEST=When ICU is rolled in, base_unittests --gtest_filter=*ICU*
and layout tests

R=jsbell@chromium.org

Review URL: https://codereview.chromium.org/251203003

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu52@266919 4ff67af0-8c30-449e-8e8b-ad334ec8d88c