|
Posted by Chung Leong on 01/25/06 17:48
ralphie wrote:
> thanks chung, i'm really happy to find a mate fighting the same
> problems.
>
> you suggest using normal varchar or text fields. how to store utf-8 in
> them? well i know if i insert it through php it works and it turns out
> in some wired characters (at least displayed like that in the
> enterprise manager). the nice thing is if i fetch it again via php it
> comes back as arabic text. that so far is cool. the problem arises if i
> want to import data via the enterprise manager, this one would convert
> the arabic signs to ?? only. if i want to copy past the data into it,
> it does not accept it at all in normal fields but displays it correctly
> in the n-types.. the ohter thing i wonder about is the sorting and
> stuff.. if the data are stored in this wired (sorry don't know the name
> for what that is, just some symbols) format i wonder about the
> collation (sorting, etc) stuff? would it still work fine?
Yeah, that's the problem with storing it as UTF-8: the text will show
up as garbage in Enterprise Manager and Query Analyser. Collation will
also be weird. If you set the column to do binary sort, the result
would be somewhat reasonable, as the alef will still come before the
alef maksura encoded in UTF-8. The digits come after the letters
though, which might not be what you'd want. The order would be
incorrect too if you need to use pe or gaf.
The n- columns offer the best solution. I would give ADODB another
shot. COM is problematic in PHP4. Support might have improved in PHP5.
In theory, if you pass CP_UTF8 as codepage to COM(), you'd get UTF-8
text out of the resultsets. I remember that when I tried it though,
nothing happened. This was a couple years ago. Maybe newer versions of
ADODB would work better.
[Back to original message]
|