Re: Binarycloud and UTF
Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/[email protected]> Fri, 18 Mar 2005 18:06:21 +0100
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
Manuel Holtgrewe wrote:
> Though mbstrings provides more multi byte safe functions it is not very
> common and if binarycloud depends on it we set the entry level pretty
> high (own server).
We can have a branch for multilanguage, and a third one for unicode
multilanguage...
> - mb_ereg_* Ereg seems not to be multi byte safe. PREG is not UTF safe
> seemingly, too.
False, it's since a long time (pcre version 3 I read)
> However, there seems to be a "/u" flag for unicode
> support. We need to investigaget there [2].
From manual:
u (PCRE_UTF8)
This modifier turns on additional functionality of PCRE that is
incompatible with Perl. Pattern strings are treated as UTF-8. This
modifier is available from PHP 4.1.0 or greater on Unix and from PHP
4.2.3 on win32.
So u flag is for Pattern only, and available.
> - mb_parse We need no global parsing from GET/POST/COOKIE, I guess
> - mb_split Splitting by regex can be done with preg and "/u" flag
> - mb_strcut There is iconv_substr that does the same
> - mb_strimwidth The same can be done with iconv_substr and iconv_strlen
> - mb_strlen, mb_strpos, mb_strrpos, mb_substr There are equivalent
> methods with iconv
> - mb_strtolower, mb_strtoupper There is no equivalent, but I do not
> know if we need this for base code. Base configuration names, for
> example, are in English always and that fits into 7 bytes.
> - mb_strwidth No equivalent - required in base code?
> - mb_substitute_character, mb_substr_count No direct equivalent -
> required in base code?
> I think we should evaluate all this and then look on binarycloud's base
> code (vortex packages can use mbstring IMO or we provide two versions)
> and get sure that unicode works. In many cases we will not need unicode
> safeness since the string that is operated are event ids and those come
> from configuration (See next point).
And what if Indian or Chinese people want to have their events ids or
strings id not set in english ?
> C.) Most configuration values should be English and use 7bit only. This
> means we do not need multi byte safe methods in many places.
No. If we make a multibyte system, it must be safe, not guess it will
not receive any mb cahr :(
> D.) We use PEAR/I18Nv2 to transcode from UTF-8 to the charset requested
> by the user (or set in code). See [3] for the documentation of this
> feature of I18Nv2
I'll read this pear file this night.
--
Jean-Christophe Michel
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev