[dokuwiki] Re: UTF-8 library (@harry)
- From: "Harry Fuecks" <hfuecks@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 19 Jul 2007 14:38:55 +0200
Hi Andreas,
That someone is partly correct and I did write
http://www.phpwact.org/php/i18n/utf-8.
explode() for example I initially implemented (which is why you have)
and only later figured out it's not needed (assuming well formed
UTF-8) - think I told you in fact, but as part of a bigger email
exchange we were having at the time. Specifically;
- substr_replace()
Wrong - this you do need to re implement because of the third and
fourth arguments (start, length) - for the native PHP function these
integers represent a number of bytes, not characters.
- explode()
Right - you don't need to reimplement
- str_replace()
Right - you don't need to reimplement
- ltrim()
- rtrim()
- trim()
You only need to re-implement if you are supplying the 2nd charlist
optional arg _and_ it contains UTF-8 characters.
Hope that helps.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: UTF-8 library (@harry)
- From: Andreas Gohr
- References:
- [dokuwiki] UTF-8 library (@harry)
- From: Andreas Gohr
Other related posts:
- » [dokuwiki] UTF-8 library (@harry)
- » [dokuwiki] Re: UTF-8 library (@harry)
- » [dokuwiki] Re: UTF-8 library (@harry)
- substr_replace()
- explode()
- str_replace()
- ltrim() - rtrim() - trim()
- [dokuwiki] Re: UTF-8 library (@harry)
- From: Andreas Gohr
- [dokuwiki] UTF-8 library (@harry)
- From: Andreas Gohr