diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 16:40:38 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 16:40:38 +0000 |
commit | 548a6c0f30c3dcf374cc06be48f02a06da5c1d19 (patch) | |
tree | 57a3406e6d51b44774b9fa37cde1810a1d76a47c /base/i18n | |
parent | b78e6049b83a6a221b6c7b47c229b337e3abce43 (diff) | |
download | chromium_src-548a6c0f30c3dcf374cc06be48f02a06da5c1d19.zip chromium_src-548a6c0f30c3dcf374cc06be48f02a06da5c1d19.tar.gz chromium_src-548a6c0f30c3dcf374cc06be48f02a06da5c1d19.tar.bz2 |
Changes are:
* base::IsValidCodepoint() now returns false on non-character code points.
* base::IsStringUTF8() now uses ICU library (removed old Mozilla implementation).
* Removed base::IsStringWideUTF8() (was unused and confusing)
* file_util::ReplaceIllegalCharactersInPath() now treats Unicode replacement character (U+FFFD) as invalid.
* Associated unit tests updated.
BUG=2759
BUG=30662
TEST=base_unittests --gtest_filter=StringUtilTest.IsStringUTF8
TEST=base_unittests --gtest_filter=UTFStringConversionsTest.*
TEST=base_unittests --gtest_filter=FileUtilICUTestReplaceIllegalCharactersInPathTest
Review URL: http://codereview.chromium.org/548017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/i18n')
-rw-r--r-- | base/i18n/file_util_icu.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/i18n/file_util_icu.cc b/base/i18n/file_util_icu.cc index f62a05e..914d2dd 100644 --- a/base/i18n/file_util_icu.cc +++ b/base/i18n/file_util_icu.cc @@ -62,9 +62,10 @@ IllegalCharacters::IllegalCharacters() { DCHECK(U_SUCCESS(status)); // Add non-characters. If this becomes a performance bottleneck by // any chance, do not add these to |set| and change IsFilenameLegal() - // to check |ucs4 & 0xFFFEu == 0xFFFEu|, in addiition to calling + // to check |ucs4 & 0xFFFEu == 0xFFFEu|, in addition to calling // containsNone(). set->add(0xFDD0, 0xFDEF); + set->add(0xFFFD); // Standard replacement character. for (int i = 0; i <= 0x10; ++i) { int plane_base = 0x10000 * i; set->add(plane_base + 0xFFFE, plane_base + 0xFFFF); |