Re: mb_convert_case (Was: Re: #19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings)
| From: | Stig Venaas | Date: | Wed, 09 Oct 2002 21:00:12 +0000 |
| Subject: | Re: mb_convert_case (Was: Re: #19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings) | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89303@lists.php.net to get a copy of this message | ||
On Thu, Sep 26, 2002 at 02:10:04AM +0100, Wez Furlong wrote:
> All:
>
> I've just committed a php-style version of the ucdata package that Stig
> directed me to.
Great!
> Stig:
> Rather than generate binary data files at configure time, based on
> a bundled UnicodeData.txt file which is quite large, causes problems
> for win32 builds, and has run-time thread safety and data file location
> issues (for freshly built but not installed php binaries), I settled on
> having ucgendat generate a header file with the ctype and case data tables
> declared within it.
> All that is needed is to add these files to the build and voila! it works :-)
Yes, I think that's a good solution. The tables are very stable.
Could you also commit the source for your modified ucgendat? Or is it
there somewhere?
> There are some interesting functions available in the ucdata package; some
> of them might benefit mbstring, so perhaps it is worth a look?
I think Unicode normalization should be useful to people. If you want to
do matching (looking for "equal" Unicode strings), you really need this.
But I haven't really seen anyone ask for this yet. So far I have avoided
this problem since I've been using OpenLDAP to store data, and it does
the necessary normalization and matching for me, if I stored Unicode in
another database... If for instance you use some SQL database, you should
normalize all data before storing it, and also normalize strings in
queries.
Stig