| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_I18N_ICU_STRING_CONVERSIONS_H_ | 5 #ifndef BASE_I18N_ICU_STRING_CONVERSIONS_H_ |
| 6 #define BASE_I18N_ICU_STRING_CONVERSIONS_H_ | 6 #define BASE_I18N_ICU_STRING_CONVERSIONS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // returns false. | 57 // returns false. |
| 58 bool WideToCodepage(const std::wstring& wide, | 58 bool WideToCodepage(const std::wstring& wide, |
| 59 const char* codepage_name, | 59 const char* codepage_name, |
| 60 OnStringConversionError::Type on_error, | 60 OnStringConversionError::Type on_error, |
| 61 std::string* encoded); | 61 std::string* encoded); |
| 62 bool CodepageToWide(const std::string& encoded, | 62 bool CodepageToWide(const std::string& encoded, |
| 63 const char* codepage_name, | 63 const char* codepage_name, |
| 64 OnStringConversionError::Type on_error, | 64 OnStringConversionError::Type on_error, |
| 65 std::wstring* wide); | 65 std::wstring* wide); |
| 66 | 66 |
| 67 // Converts from any codepage to UTF-8 and ensures the resulting UTF-8 is |
| 68 // normalized. |
| 69 bool ConvertToUtf8AndNormalize(const std::string& text, |
| 70 const std::string& charset, |
| 71 std::string* result); |
| 72 |
| 67 } // namespace base | 73 } // namespace base |
| 68 | 74 |
| 69 #endif // BASE_I18N_ICU_STRING_CONVERSIONS_H_ | 75 #endif // BASE_I18N_ICU_STRING_CONVERSIONS_H_ |
| OLD | NEW |