| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_module.h" | 8 #include "ppapi/c/pp_module.h" |
| 9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
| 10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // Silently skips over errors. Unrepresentable characters and input encoding | 23 // Silently skips over errors. Unrepresentable characters and input encoding |
| 24 // errors will be removed from the output. | 24 // errors will be removed from the output. |
| 25 PP_CHARSET_CONVERSIONERROR_SKIP, | 25 PP_CHARSET_CONVERSIONERROR_SKIP, |
| 26 | 26 |
| 27 // Replaces the error or unrepresentable character with a substitution | 27 // Replaces the error or unrepresentable character with a substitution |
| 28 // character. When converting to a Unicode character set (UTF-8 or UTF-16) | 28 // character. When converting to a Unicode character set (UTF-8 or UTF-16) |
| 29 // it will use the unicode "substitution character" U+FFFD. When converting | 29 // it will use the unicode "substitution character" U+FFFD. When converting |
| 30 // to another character set, the character will be charset-specific. For | 30 // to another character set, the character will be charset-specific. For |
| 31 // many languages this will be the representation of the '?' character. | 31 // many languages this will be the representation of the '?' character. |
| 32 PP_CHARSET_CONVERSIONERROR_SUBSTITUTE, | 32 PP_CHARSET_CONVERSIONERROR_SUBSTITUTE |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 struct PPB_CharSet_Dev { | 35 struct PPB_CharSet_Dev { |
| 36 // Converts the UTF-16 string pointed to in |*utf16| to an 8-bit string in the | 36 // Converts the UTF-16 string pointed to in |*utf16| to an 8-bit string in the |
| 37 // specified code page. |utf16_len| is measured in UTF-16 units, not bytes. | 37 // specified code page. |utf16_len| is measured in UTF-16 units, not bytes. |
| 38 // This value may not be NULL. | 38 // This value may not be NULL. |
| 39 // | 39 // |
| 40 // The return value is a NULL-terminated 8-bit string corresponding to the | 40 // The return value is a NULL-terminated 8-bit string corresponding to the |
| 41 // new character set, or NULL on failure. THIS STRING MUST BE FREED USING | 41 // new character set, or NULL on failure. THIS STRING MUST BE FREED USING |
| 42 // PPB_Core::MemFree(). The length of the returned string, not including the | 42 // PPB_Core::MemFree(). The length of the returned string, not including the |
| (...skipping 26 matching lines...) Expand all Loading... |
| 69 // Returns a string var representing the current multi-byte character set of | 69 // Returns a string var representing the current multi-byte character set of |
| 70 // the current system. | 70 // the current system. |
| 71 // | 71 // |
| 72 // WARNING: You really shouldn't be using this function unless you're dealing | 72 // WARNING: You really shouldn't be using this function unless you're dealing |
| 73 // with legacy data. You should be using UTF-8 or UTF-16 and you don't have | 73 // with legacy data. You should be using UTF-8 or UTF-16 and you don't have |
| 74 // to worry about the character sets. | 74 // to worry about the character sets. |
| 75 struct PP_Var (*GetDefaultCharSet)(PP_Module module); | 75 struct PP_Var (*GetDefaultCharSet)(PP_Module module); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ | 78 #endif // PPAPI_C_DEV_PPB_CHAR_SET_DEV_H_ |
| OLD | NEW |