Re: mb_substr()

From: Date: Sun, 30 Jul 2006 22:42:35 +0000
Subject: Re: mb_substr()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239888@lists.php.net to get a copy of this message
tedd wrote:
Hi gang: From another list, a person posted: "I want to use PHP's mb_substr() function to grab the first letter of a UTF-8 encoded word (in Czech) being pulled out of MySQL. If I use the plain substr() the data gets garbled and I get a ? symbol in the browser. My host says that in order to get multibyte string functions I'd have to compile my own copy of PHP. That's getting a little deeper than I want to for one function on one page. Does anyone know what I could do as a workaround?" I've tried to help, but it appears beyond me. Anyone have any advice I could pass on?
"Out of luck". mb_substr handles multibyte character sets, substr doesn't. Same as the rest of the multibyte functions. (Kinda like asking "I want to use all some of the GD functions but I don't have GD - what can I do").. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#239888) next »