|
|
|
|
|
- UTF-8 and ANSI conversion
- Conversion in PHP
UnicodeToAnsi (Function) In french: UnicodeVersAnsi Converts: - a UNICODE string to an ANSI string (Windows).
- a buffer containing a UNICODE string to a buffer containing an ANSI string (Windows).
Reminder: - ANSI is the character set used in Windows.
- UNICODE is a character encoding standard. UNICODE is used to manage different languages and character sets.
MyAnsiBuffer is Buffer // Convert the MyUnicodeBuffer buffer // that contains a UNICODE string // to a buffer containing an ANSI string MyAnsiBuffer = UnicodeToAnsi(MyUnicodeBuffer)
Syntax
Converting a Unicode string Hide the details
<Result> = UnicodeToAnsi(<String to convert> [, <Charset> [, <Unknown character>]])
<Result>: String or buffer ANSI string. <String to convert>: Unicode string UNICODE string to be converted. This parameter can also be an ANSI string that contains UNICODE characters. <Charset>: Optional Integer constant Character set that will be used for the conversion. | | charsetAnsi | Roman characters in ANSI standard. | charsetArabic | Arabic characters. | charsetBaltic | Baltic characters. | charsetChinese | Chinese characters (People's Republic of China). | charsetCurrent Default value | Uses the current character set specified with ChangeCharset (charsetOccidental by default). | charsetDefault | Uses the computer's default character set. No character set is forced. | charsetEastEurope | Eastern European characters (Polish, etc.). | charsetGreek | Greek characters. | charsetHebrew | Hebrew characters. | charsetJapanese | Japanese characters. | charsetKorean | Korean characters. | charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard. | charsetRussian | Russian characters. | charsetThai | Thai characters. | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan). | charsetTurkish | Turkish characters. | charsetUTF8 | Used to manage UTF-8 (used in XML, for example). | charsetVietnamese | Vietnamese characters. |
<Unknown character>: Optional character or constant Character to use if an unknown character is encountered during the conversion process. The NULL constant allows you to use the default system character.
Converting a buffer containing a Unicode string Hide the details
<Result> = UnicodeToAnsi(<Buffer> [, <Charset> [, <Unknown character>]])
<Result>: Buffer Buffer containing an ANSI string. <Buffer>: Buffer Buffer containing the UNICODE string to be converted. If <Buffer> contains an ANSI string, the result will be undefined. <Charset>: Optional Integer constant Character set that will be used for the conversion.
| | charsetAnsi | Roman characters in ANSI standard. | charsetArabic | Arabic characters. | charsetBaltic | Baltic characters. | charsetChinese | Chinese characters (People's Republic of China). | charsetCurrent Default value | Current character set specified with ChangeCharset (charsetOccidental by default). | charsetDefault | Uses the computer's default character set. No character set is forced. | charsetEastEurope | Eastern European characters (Polish, etc.). | charsetGreek | Greek characters. | charsetHebrew | Hebrew characters. | charsetJapanese | Japanese characters. | charsetKorean | Korean characters. | charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard. | charsetRussian | Russian characters. | charsetThai | Thai characters. | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan). | charsetTurkish | Turkish characters. | charsetUTF8 | Used to manage UTF-8 (used in XML, for example). | charsetVietnamese | Vietnamese characters. |
<Unknown character>: Optional character or constant Character to use if an unknown character is encountered during the conversion process. The NULL constant allows you to use the default system character.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|