[dev] shortcuts

Jan Schneider jan at horde.org
Fri Apr 25 11:22:00 PDT 2003


Zitat von Eric Rostetter <eric.rostetter at physics.utexas.edu>:

> > > I'm open to ideas on the proper solution when utf-8 is used.
> >
> > maybe just using the new style for big-5 ??
>
> No, the problem can potentially happen with any multi-byte character
> set except possibly utf, so it should be enabled for many if not all
> multi-byte character sets except for maybe utf ones.
>
> Chuck has already changed it for utf-8, so your problem is at least for
> now gone.  This is a fringe case, that I don't have a good answer for.
> Basically, AFAIK, this breaks big-5 support again if utf-8 is enabled.

No, it won't break it. And to be honest, your "fix" in incorrect because it
only fixes a symptom. The real problem is that mbstring doesn't support
Big-5 (along with some other mb charsets) though it claims to do so.

I'm still trying to find out what's going wrong there, but unfortunately
this extension and its documentation is really a mess.

UTF-8 doesn't need to handled by your workaround because it _is_ supported
by mbstring, so it's safe to take single characters out of a string with
our mutlibyte safe String:: functions.

What we need to do to really fix this problem instead of workaround it,
would be to find out why some charsets aren't working in mbstring, document
how to enable them, and find a way to detect what charsets are supported
and handle only these seperately, not just every multibyte charset.

Btw, is there any special reason, that you set the maximum bytes per
character in nls.php instead of a simple bool flag if this charset is a
multibyte one?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list