multibyte-functions

mb_convert_encoding, undefined function while mbstring is enabled

强颜欢笑 提交于 2019-11-30 07:47:05
问题 I have a server (Ubuntu 11.10 x64) running PHP 5.3.8 with Apache2 / MySQL. I'm currently working on a project where I'm required to do some specific character encoding, but I found out that none of the multibyte (mb_* functions) are working. However, when I look in phpinfo(), I see that multibyte support is enabled. I've tried things like apt-get install php5-mbstring, php-mbstring, php-multibyte, etc. etc. but none seem to work. Can anyone point me in the right direction for this? Thanks in

Windows API: ANSI and Wide-Character Strings — Is it UTF8 or ASCII? UTF-16 or UCS-2 LE?

China☆狼群 提交于 2019-11-29 20:26:26
I'm not quite pro with encodings, but here's what I think I know (though it may be wrong): ASCII is a 7-bit, fixed-length encoding, with the characters you can find in ASCII charts. UTF8 is an 8-bit, variable-length encoding. All characters can be written in UTF8. UCS-2 LE/BE are fixed-length, 16-bit encodings that support most common characters. UTF-16 is a 16-bit, variable-length encoding. All characters can be written in UTF16. Are those above all correct? Now, for the questions: Do the Windows "A" functions (like SetWindowTextA ) take in ASCII strings? Or "multi-byte strings" (more

Using UTF-8 charset with PHP - are mb functions required?

我与影子孤独终老i 提交于 2019-11-29 15:32:34
问题 These past few days I've been working toward converting my PHP code base from latin1 to UTF-8. I've read the two main solutions are to either replace the single byte functions with the built in multibyte functions, or set the mbstring.func_overload value in the php.ini file. But then I came across this thread on stack overflow, where the post by thomasrutter seems to indicate that the multibyte functions aren't actually necessary for UTF-8, as long as the script and string literals are

Windows API: ANSI and Wide-Character Strings — Is it UTF8 or ASCII? UTF-16 or UCS-2 LE?

岁酱吖の 提交于 2019-11-28 17:06:57
问题 I'm not quite pro with encodings, but here's what I think I know (though it may be wrong): ASCII is a 7-bit, fixed-length encoding, with the characters you can find in ASCII charts. UTF8 is an 8-bit, variable-length encoding. All characters can be written in UTF8. UCS-2 LE/BE are fixed-length, 16-bit encodings that support most common characters. UTF-16 is a 16-bit, variable-length encoding. All characters can be written in UTF16. Are those above all correct? Now, for the questions: Do the

PHP Multi Byte str_replace?

匆匆过客 提交于 2019-11-27 15:04:40
I'm trying to do accented character replacement in PHP but get funky results, my guess being because i'm using a UTF-8 string and str_replace can't properly handle multi-byte strings.. $accents_search = array('á','à','â','ã','ª','ä','å','Á','À','Â','Ã','Ä','é','è', 'ê','ë','É','È','Ê','Ë','í','ì','î','ï','Í','Ì','Î','Ï','œ','ò','ó','ô','õ','º','ø', 'Ø','Ó','Ò','Ô','Õ','ú','ù','û','Ú','Ù','Û','ç','Ç','Ñ','ñ'); $accents_replace = array('a','a','a','a','a','a','a','A','A','A','A','A','e','e', 'e','e','E','E','E','E','i','i','i','i','I','I','I','I','oe','o','o','o','o','o','o', 'O','O','O','O','O'