|
|
|
|
|
- UTF-8 and ANSI conversion
- Conversion in PHP
UnicodeToAnsi (Function) In french: UnicodeVersAnsi Converts: - a character string in Unicode format into a character string in ANSI format (Windows).
- a buffer containing a string in Unicode format into a buffer containing a string in ANSI (Windows) format.
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.
MonBufferAnsi is Buffer
MonBufferAnsi = UnicodeToAnsi(MonBufferUnicode)
Syntax
Converting a Unicode string Hide the details
<Result> = UnicodeToAnsi(<String to convert> [, <Charset> [, <Unknown character>]])
<Result>: String or buffer Character string in ANSI format. <String to convert>: Unicode string Unicode string to convert. This parameter can also be a string in ANSI format containing 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 a string of Unicode characters 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|