Re: Multi-byte strings and Japanese characters

From: Date: Sat, 28 Sep 2002 09:38:13 +0000
Subject: Re: Multi-byte strings and Japanese characters
References: 1 2 3 4  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-336@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
Jonas Koch Bentzen wrote:
Yasuo Ohgaki wrote:
For instance, UTF-8 can be 6 bytes at most, and inserting newline, etc to middle of multibyte sequence breaks multi-byte chars obviously.
What about functions like wordwrap()? Would a line like wordwrap($_POST["body"], 76, "\r\n"); break a Japanese string?
IIRC, wordwrap wraps when there is space, I guess you would like to try something like this. wordwrap($str, 1, "\r\n", TRUE);
I'm sorry, I don't understand. Why would I want to break at just 1 character? But I guess since wordwrap() wraps at space, it can't break a Japanese string?

« previous php.i18n (#336) next »