Re: [PHP-I18N] trimming spaces from multibyte strings From: Jean-Christian Imbeault (jc <email protected>)
Date: 05/06/03

Moriyoshi Koizumi wrote:
>
> Since trim() can take the second parameter as well so you can specify which
> character to be trimmed,

True. But if I understand correctly then the "default" trim() (without
supplying a list of characters) *is* multibyte safe, though it might not
remove all whitespace?

> In many case, the full-width space isn't treated as a generic white space
> in regex expressions.

I've found that out :) According to the regexp specifications (if there
are any) *should* the full-width space be treated as generic whitespace?

>>But since you suggest it I will ask for this as a new feature as I
>>really do find it difficult to remove whitespace from multibyte strings :)
>
> Well, do you really find it difficult? :)

Yes. Horribly so :) In my case it is difficult because for one, our PHP
server do not have japanese input or editing capabilities so I cannot
type any Japanese into a regexp for example, secondly I often access PHP
servers across SSH from a non-japanese machine so even if the server
could handle japanese input I don't have an IME ...

But my main gripe is that someone came up with the wonderful trim()
function. Could someone come up with the wonderful mb_trim() function?
:) I would code it myself and contribute but I am not very proficient in
the issues concerning multibyte character sets :(

Jc

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php