summaryrefslogtreecommitdiffstats
path: root/base/i18n
Commit message (Collapse)AuthorAgeFilesLines
* ** 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
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-073-91/+211
| | | | | | | | | | | | | | | | | | | | during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98
* Do some cleanup of file path name handling.brettw@chromium.org2009-10-223-44/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | This started trying to cleanup DownloadManager::GenerateFilename which asserts if your system locale isn't UTF-8 (I ran into this when mine got messed up). The solution is to have GetSuggestedFilename return a FilePath rather than calling FromWStringHack. The rest of the patch is a result of trying to write GetSuggestedFilename in a reasonable way. I changed ReplaceIllegalCharacters to work on a FilePath::StringType. Some places in the code calling these functions got cleaner, some got messier. I think overall the ones that got messier are the ones doing sketchy things with paths and the ones that got cleaner are the ones doing things more properly. The only code here that gets called a nontrivial number of times is the weburlloader, and I think the new code does about the same number of string conversions overall (though on certain platforms the number will be higher or lower). BUG=none TEST=none Review URL: http://codereview.chromium.org/271056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29832 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate PathService::Get(..., wstring*) and use FilePath instead.evan@chromium.org2009-10-191-4/+3
| | | | | | | | | | | | I tried fixing all the Windows code but there's a *ton* of it. This change will at least prevent people from adding new code that uses the deprecated version (as that won't compile on Lin/Mac). BUG=24672 Review URL: http://codereview.chromium.org/293013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29472 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-103-18/+364
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-097-0/+469
| | | | | | | | | | | | depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-085-0/+364
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
* Copy the relevant parts of ICU to a new file base/third_party/icu/icu_utf.*brettw@chromium.org2009-10-073-440/+61
| | | | | | | | | | | | | | so we can do basic UTF8/16/32 conversions without linking all of ICU. Change callers who used to call SysUTF8ToWide/SysWideToUTF8 in base to using these new functions. I will remove the Sys versions of these functions in a later patch. TEST=none BUG=none Review URL: http://codereview.chromium.org/243102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28219 0039d316-1c4b-4281-b951-d872f2087c98
* Move the ICU string conversions into its own file. This new file is includedbrettw@chromium.org2009-10-022-0/+727
from the old string_util to avoid changing any callers at this time. BUG=none TEST=none Review URL: http://codereview.chromium.org/257032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27914 0039d316-1c4b-4281-b951-d872f2087c98