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); -- Yasuo Ohgaki -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php