summaryrefslogtreecommitdiffstats
path: root/base/i18n
Commit message (Collapse)AuthorAgeFilesLines
* Pull in ICU 4.6jshin@chromium.org2011-02-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the expected result for the display name of es-419. It does not have 'Carribean Islands' any more in the English display name. Also, swap two parameters of EXPECTED_EQ so that the 1st param is 'expected' and the 2nd is 'actual' in two tests in l10n_util_unittest.cc In addition, change icu_string_conversions.cc to fix the failure of ICUStringConversionsTest.ConvertCodepageUTF8. The test uses WideToCodepage that calls u_strFromWCS. Where U_WCHAR_IS_UTF32 is defined, it calls u_strFromUTF32. On Mac, it's not defined because neither __STDC_ISO_10646__ nor _UCS4_ is defined. As a result, wcstombs is called, which doesn't work as we want it to. There are two ways to fix this: - Directly call u_strFromUTF32 on Mac/Linux. What this CL does. - Manually define U_WCHAR_IS_UTF32 in icu's pmac.h, which is done in http://codereview.chromium.org/6578003 We do both to be block wcs*mbs/mbs*wcs from being called in other parts of ICU when U_WCHAR_IS_UTF32 is not defined. BUG=61514 TEST=Build goes fine and tests pass. Review URL: http://codereview.chromium.org/6532030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75854 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for ICU data in a data file.thomasvl@chromium.org2011-02-101-1/+36
| | | | | | | | | | | | | | | | | | | | | - Mac Foundation utility for fetching a resource from the MainAppBundle. - Bringing in newer ICU dep that has optional support for using the ICU data file. - If Mac is built using a ICU data file, directly map in the data so it will work even in a sandboxed process. **The build does not use this data file support at this time.** This might help the Mac bots as it means each unittest that depends on base will be ~10meg smaller, helping link and also helping with the copy of bits from the builder to the tester. If Mac ever support a Universal binary (32bit and 64bit) it will also probably want to use this to avoid carrying two copies of the ICU data. Review URL: http://codereview.chromium.org/6479021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74474 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-2/+2
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* base/i18n: Add namespace i18n to CharIterator.tfarina@chromium.org2011-01-203-9/+25
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/6355005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71910 0039d316-1c4b-4281-b951-d872f2087c98
* Move BiDiLineIterator to base/i18n/ directory.tfarina@chromium.org2011-01-202-0/+107
| | | | | | | | | BUG=23581 TEST=trybots Review URL: http://codereview.chromium.org/6249007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71884 0039d316-1c4b-4281-b951-d872f2087c98
* Add SCOPED_TRACEs to ICUStringConversionsTestphajdan.jr@chromium.org2011-01-041-0/+20
| | | | | | | | | | | | to help debug http://bugs.gentoo.org/show_bug.cgi?id=350347 They are also useful in general, so I don't plan to remove them later. BUG=none TEST=none Review URL: http://codereview.chromium.org/5982003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70430 0039d316-1c4b-4281-b951-d872f2087c98
* Update the time formatting APIs to use string16.avi@chromium.org2010-12-222-20/+17
| | | | | | | | | BUG=23581 TEST=everything still works Review URL: http://codereview.chromium.org/6064003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69948 0039d316-1c4b-4281-b951-d872f2087c98
* Add BREAK_NEWLINE mode to break_iterator.cctsepez@chromium.org2010-12-213-41/+263
| | | | | | | | | BUG=49747 TEST=BreakIteratorTest.* Review URL: http://codereview.chromium.org/5935002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69874 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build with -Duse_system_icu=1 and libicu-4.4.*phajdan.jr@chromium.org2010-12-201-4/+6
| | | | | | | | | | | | | | UBreakIterator is a struct in newer versions of libicu; must explicitly cast iter_, which is defined as a void*. Failing to do so causes gcc to complain about implicitly converting from a void*. Contributed by Mike Gilbert <floppymaster@gmail.com>. Original review: http://codereview.chromium.org/6047001 BUG=None TEST=Build with -Duse_system_icu=1 Review URL: http://codereview.chromium.org/6015003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69713 0039d316-1c4b-4281-b951-d872f2087c98
* Commiting second word iterator patch for tsepez. this was originally ↵cdn@chromium.org2010-12-153-63/+70
| | | | | | | | reviewed at http://codereview.chromium.org/5796003/ Review URL: http://codereview.chromium.org/5707011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69278 0039d316-1c4b-4281-b951-d872f2087c98
* Make members of Singleton<T> private and only visible to the singleton type. ↵satish@chromium.org2010-12-141-12/+14
| | | | | | | | | | | | | | | This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69107 0039d316-1c4b-4281-b951-d872f2087c98
* Fix extension install UI for extensions with RTL Names.jeremy@chromium.org2010-12-122-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a version of AdjustStringForLocaleDirection() that handles the quirks of GTK/OSX label autodirectionality. Comment from the CL: // On OS X & GTK the directionality of a label is determined by the first // strongly directional character. // However, we want to make sure that in an LTR-language UI all strings are // left aligned and vice versa. // A problem can arise if we display a string which starts with user input. // User input may be the opposite directionality and so the whole string will // be displayed in the opposite directionality, e.g. if we want to display in // an LTR UI [such as US English]: // // EMAN_NOISNETXE is now installed. // // Since EXTENSION_NAME begins with a strong RTL char, the label's // directionality will be set to RTL and the string will be displayed visually // as: // // .is now installed EMAN_NOISNETXE // // In order to solve this issue, we prepend an LRM to the string which is a // strongly directional LTR char. // We also append an LRM at the end which ensures that we're in an LTR // context. // Unlike Windows, Linux and OS X can correctly display RTL glyphs out of the // box so there is no issue with displaying zero-width bidi control characters // on any system. Thus no need for the !IsRTL() check here. BUG=63303 TEST=1. Try scenario described in bug. 2. Make sure there areno regressions displaying RTL strings in LTR UI and vice versa on OS X. Review URL: http://codereview.chromium.org/5291009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68967 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 68932 - Make members of Singleton<T> private and only visible to the ↵satish@chromium.org2010-12-111-14/+12
| | | | | | | | | | | | | | | | | | singleton type. This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 TBR=satish@chromium.org Review URL: http://codereview.chromium.org/5721005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68936 0039d316-1c4b-4281-b951-d872f2087c98
* Make members of Singleton<T> private and only visible to the singleton type. ↵satish@chromium.org2010-12-111-12/+14
| | | | | | | | | | | | | | | This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68932 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ICU header dependencies outside of /i18n directory.cdn@chromium.org2010-12-102-12/+22
| | | | | | | | | | Committing for tsepez. Original code review is here http://codereview.chromium.org/5682002/ BUG=49747 TEST=WordIteratorTest.* Review URL: http://codereview.chromium.org/5718003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68867 0039d316-1c4b-4281-b951-d872f2087c98
* This CL add a GetInstance() method to singleton classes instead of relying ↵satish@chromium.org2010-12-041-19/+27
| | | | | | | | | | | | | | | | | on the callers to use Singleton<T>. In some cases I have used the LazyInstance<T> pattern as that was simpler. This is a small step towards making all singleton classes use the Singleton<T> pattern within their code and not expect the callers to know about it. I have selected all files under src/app and src/base which use Singleton<T> in this CL. Once this CL goes in I'll work on the rest of the files. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5527004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68300 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup AdjustStringForLocaleDirection() to modify input parameter in place.jeremy@chromium.org2010-11-242-32/+17
| | | | | | | | | | | As described in the bug, the current behavior is confusing and bug-prone. BUG=47194 TEST=Check that there are no visible regressions in RTL and LTR language UIs on Linux & Windows. Review URL: http://codereview.chromium.org/5154009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67237 0039d316-1c4b-4281-b951-d872f2087c98
* FTP: improve character encoding detection in cases where ICU's first guess ↵phajdan.jr@chromium.org2010-11-182-5/+37
| | | | | | | | | | | | | | | | | | | is wrong. Instead of using ICU's first guessed encoding immediately, we ask it for all possible encodings, try them in order, and use the first one that works. For some sites this still results in a gibberish being displayed, but at least the links are clickable so the site navigation is possible. BUG=61073 TEST=see bug Review URL: http://codereview.chromium.org/4967001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66664 0039d316-1c4b-4281-b951-d872f2087c98
* The UI language rather than the locale is now used to pick Chrome's language ↵grt@chromium.org2010-11-162-21/+2
| | | | | | | | | | | | | | | on Windows. (Also fixed some unrelated lint errors.) With this change, l10n_util::GetApplicationLocale first checks for an override of the "configured locale" (in base::i18n) containing the list of preferred Windows UI languages. The browser triggers an override early in startup before the ApplicationLocale is determined. In effect, the browser no longer uses ICU on Windows for language detection. (This locale override mechanism is borrowed from the OS X port.) Changes in Chrome Frame are largely a refactor, as some Win32 code in there has been moved into base/win. Also cleaned up language selection in installer_util so that the proper language is chosen for the EULA, installer messages, and shortcuts. In so doing, replaced hand-crafted lists of supported languages with either auto-generated lists (static consts) or logic so that the addition of translations in the future doesn't require code motion (that being said, there may be reason to update the alias and/or wildcard tables in language_selector.cc). In so doing, this change unlocks Amharic, Farsi, and Swahili translations for installer messages and shortcuts. BUG=39986,40496,26470 TEST=New MUI/Win32 calls are tested in base/win/i18n_unittest.cc. To test the overall functionality, uninstall Chrome, remove intl.app_locale user pref, switch to a supported display language (via the "Keyboards and Languages" tab of Win7's "Regional and Language" control panel, and install with { "distribution": { "require_eula": true } } in master_preferences (via -installerdata arg to setup.exe). If all goes well, both EULA and outer frame are in the same language as Windows. Also, from gwilson: "Install system-level Chrome in audit mode on a new machine, then go through the out-of-box-experience, select a language, and the in -product EULA (triggered by "require_eula" : true) and Chrome's UI should be in the language that the user selected." Review URL: http://codereview.chromium.org/4139010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66275 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for the extended header parameter syntax in Content-Disposition ↵jshin@chromium.org2010-11-033-0/+62
| | | | | | | | | | | | | | | | | | | | | | header (RFC 5987). It's not generic, but is only used for 'filename' param. The CL is originally by James Simonsen I reviewed at http://codereview.chromium.org/4254001/show I added a check for ASCIIness for RFC 5987 extended header and a few tests to NetUti*.GetFileNameFromCD (net_unittests) and I*.ConvertCo*Norma* (base_unittests). I also replaced '\uxxxx' notation with the corresponding UTF-8 byte sequence because Visual Studio does not understand it yet. BUG=57830 TEST="net_unittests --gtest_filter=NetU*.GetFil*", "base_unittests --gtest_filter=I*.Conver*Norm*" and tests at http://greenbytes.de/tech/tc2231/ Original CL / Review: By James Simonsen; at http://codereview.chromium.org/4254001/show Review URL: http://codereview.chromium.org/4435001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64987 0039d316-1c4b-4281-b951-d872f2087c98
* Use GLib to parse environment variables to determine the default locale.jshin@chromium.org2010-10-302-10/+53
| | | | | | | | | | | | | | | | | | | | | | Switch to using GLib, instead of having a Chromium specific implementation, for parsing environment variables for language preferences for all POSIX systems that use GTK+. If we have a non-GTK port in the future, we have to resurrect our custom code. This will guarantee that UI language selection in Chromium works just like for all other GTK+ applications, and simplify the code. While doing this, also do some cleaning-up of the language preferences code and add a test case to verify that the prioritization is done correctly. Original CL by Fredrik Roubert at http://codereview.chromium.org/2901004/show BUG=NONE TEST=app_unittest with "--gtest_filter=L10nUt*.*Loc*" passes. Review URL: http://codereview.chromium.org/4217004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64524 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r62959 without the changes to histogram.cc, in hopes it won't break ↵pkasting@chromium.org2010-10-192-2/+2
| | | | | | | | | | | | | | | | | | tab_switching_test, and without the changes to tools_sanity_unittest.cc, which have already been relanded separately. TBR=timsteele Original changelog message: Convert LOG(INFO) to VLOG(1) - base/. Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3850007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63009 0039d316-1c4b-4281-b951-d872f2087c98
* ** Think this may have caused TabSwitchingTest to fail, as it is parsing log ↵tim@chromium.org2010-10-182-2/+2
| | | | | | | | | | | | | | | | | files. ** Revert 62959 - Convert LOG(INFO) to VLOG(1) - base/. Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/3850006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62981 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - base/.pkasting@chromium.org2010-10-182-2/+2
| | | | | | | | | | Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62959 0039d316-1c4b-4281-b951-d872f2087c98
* Pull latest PPAPI. Change key handling to support the new API.brettw@chromium.org2010-09-232-2/+23
| | | | | | | | TEST=PPAPI UI tests BUG=none Review URL: http://codereview.chromium.org/3386019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60258 0039d316-1c4b-4281-b951-d872f2087c98
* Change ICU_UTIL_DATA_IMPL on Linux to match the reality.jshin@chromium.org2010-09-071-4/+2
| | | | | | | | | | | | | | | | | We've bundled the ICU data file for 'ages' on Linux, but ICU_UTIL_DATA_IMPL on Linux is still set to ICU_UTIL_DATA_FILE. Apparently, this hasn't been noticed because u_setDataDirectory and udata_setFileAccess just set the global variable pointing to the data file location. This is not totally free because u_setDataDirectory does some locking/unlocking. BUG=NONE TEST=Builds go through on Linux and binaries (chrome, test, etc) run just fine. Review URL: http://codereview.chromium.org/3329012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58725 0039d316-1c4b-4281-b951-d872f2087c98
* Add functions to get the length or compute a substring of UTF8 and UTF16dmazzoni@chromium.org2010-08-233-0/+276
| | | | | | | | | | | encoded strings. BUG=none TEST=Added new unit tests for each. Review URL: http://codereview.chromium.org/3133028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57051 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-191-2/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* Convert GetDisplayStringInLTRDirectionality from wstring to string16.tony@chromium.org2010-08-183-11/+15
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/3108027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56535 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded #includes of <string> and <vector> from src/app and ↵viettrungluu@chromium.org2010-08-143-8/+3
| | | | | | | | | | | src/base. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3173020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56144 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-268-0/+8
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 2 include guards found by my scriptthakis@chromium.org2010-07-261-0/+5
| | | | | | | | | | | BUG=none TEST=none TBR=erg Review URL: http://codereview.chromium.org/3059007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53652 0039d316-1c4b-4281-b951-d872f2087c98
* Make it possible to compile word_iterator.h on Gentoo when usingphajdan.jr@chromium.org2010-07-221-1/+2
| | | | | | | | | | | system ICU. TEST=none BUG=28294 Review URL: http://codereview.chromium.org/2824069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53417 0039d316-1c4b-4281-b951-d872f2087c98
* [chromeos]Set GtkWidget's default direction correctly.suzhe@chromium.org2010-07-021-1/+10
| | | | | | | | | BUG=41558 TEST=Login ChromeOS with a RTL language, the text in the omnibox should be right aligned. Review URL: http://codereview.chromium.org/2833052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51471 0039d316-1c4b-4281-b951-d872f2087c98
* Replace wstring with string16 in history. The only time wstring is used now ↵brettw@chromium.org2010-06-235-90/+128
| | | | | | | | | | | | in history is for bookmark-related stuff (the bookmarks system is still wstring-based). The substantial change here is in RTL to make a string16 variant of the functions and in changing the WordIterator to use string16 (this cleaned up some weird utf-32 code). TEST=none BUG=none Review URL: http://codereview.chromium.org/2808017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50597 0039d316-1c4b-4281-b951-d872f2087c98
* FTP: fix navigating to files listed under non-ASCII charactersphajdan.jr@chromium.org2010-05-112-0/+57
| | | | | | | | | | | We need to convert the file name back to server encoding. BUG=38016 TEST=see bug Review URL: http://codereview.chromium.org/1857002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46900 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 42867 - "OK" button disabled on "Edit Exception" dialog boxxji@chromium.org2010-05-072-3/+26
| | | | | | | | | | | | | | | | | | | | when URL is modified in non-empty input field - RTL In RTL chrome in windows, the text get from "Pattern" text field is wrapped with LRE/POP, which makes the pattern invalid. Trim explicit bidi control characters off in NativeTextfieldWin::GetText(). BUG=http://crbug.com/42867 TEST= 1. Launch Chrome with RTL language UI 2. click Wrench => Options => Under the Hood => Content settings => Exceptions => Edit... 3. modify an existing url on the Pattern field. The "OK" button should not be grayed out. Review URL: http://codereview.chromium.org/1703026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46751 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanups/style fixes. Simplifies RTL functions slightly.pkasting@chromium.org2010-05-052-28/+23
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1932006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46419 0039d316-1c4b-4281-b951-d872f2087c98
* fix mac bustage by adding NL to end of fileben@chromium.org2010-03-201-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42183 0039d316-1c4b-4281-b951-d872f2087c98
* Move RTL related functions from app/l10n_util to base/i18n/rtlben@chromium.org2010-03-203-0/+607
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1073005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
* base: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-092-2/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/678001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40972 0039d316-1c4b-4281-b951-d872f2087c98
* Make IsStringUTF8 reject (U+FDD0 .. U+FDEF) jschuh@google.com2010-02-261-9/+0
| | | | | | | | | | | Eliminated the old Mozilla implementation and used an ICU-based implementation. BUG=2759 TEST=base_unittests --gtest_filter=StringUtilTest.IsStringUTF8 Review URL: http://codereview.chromium.org/661205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40178 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36459 - Breaks 7 WebKit testsjschuh@chromium.org2010-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | Changes are: * base::IsValidCodepoint() now returns false on noncharacter 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 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/552026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36460 0039d316-1c4b-4281-b951-d872f2087c98
* Changes are:jschuh@chromium.org2010-01-161-1/+2
| | | | | | | | | | | | | | | | | * 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
* Changes to base/ from a combination of FreeBSD and OpenBSD patches.evan@chromium.org2009-12-293-3/+3
| | | | | | Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
* Split base.gyp and add base_nacl_win64 targetgregoryd@google.com2009-12-041-0/+13
| | | | | | | | | | TEST=none BUG=28176 Review URL: http://codereview.chromium.org/462009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33872 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-1/+2
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac/Linux] Fix WordIterator::GetWord() for UTF-16 surrogate pairs.shess@chromium.org2009-11-172-0/+63
| | | | | | | | | | | | | | | | For systems where !defined(WCHART_T_IS_UTF16), WordIterator transforms the input into UChar data. But GetWord() was using the resulting offsets as indices into the original string, so it could return incorrect data and/or attempt to index off the end of the input. This changes GetWord() to do do the inverse conversion from Init() for those systems. BUG=27698 TEST=See bug. Review URL: http://codereview.chromium.org/399010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32199 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-131-1/+0
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-103-165/+24
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98