PDA

View Full Version : Quite disappointed about Unicode support.


Jisung
Tue 5th Dec '00, 5:47am
I've tried to search an ID made with Korean charactors.
and I got "Warning: Offset 0 is invalid for MySQL result index 8 in /usr/local/etc/httpd/sites/vbulletin.com/htdocs/v2demo/admin/db_mysql.php on line 108
" with no result.
I don't know whether it is very difficult to implement Unicode but VB can loose all asian market.;)
I asked same Q before and one guy told that there is a way to use unicode but since I'm not famillier with programing thus I decided to wait until VB can handle Unicode. Seems not in VB2.0 :(

Wayne Luke
Tue 5th Dec '00, 12:26pm
http://www.mysql.com/documentation/mysql/commented/manual.php?section=TODO_future

Add support for UNICODE.


At this time MySQL doesn't support unicode. In order to do this, custom support for unicode would have to be written.

The PHP Manual only mentions Unicode support for XML Documents (Page 703 of the PDF).

The places you should be complaining to are http://www.mysql.com and http://www.php.net. Until the back-end supports Unicode it will be very difficult to provide this support.

Jisung
Tue 5th Dec '00, 9:43pm
Does it mean that we can't use proper function as long as mySQL doesn't support Unicode?
Would you please check this to see what meaning is?
Sorry for my poor knowledge on program.
Thank you for your information for better understanding.:)
[QUOTE]Originally posted by annams
[B]Hello all,

I am not sure how much of interest is out there for supporting foreign languages in vB. In any case here is what I had to do for adding Hindi support (via Unicode)to vB -

Problem
======

vB is translating Unicode characters (they are represented as &#number; where number is the Unicode value) as seen in the following test message I posted.

http://www.vbulletin.com/forum/showthread.php?postid=34253

Solution
======

After digging into the code I found that vB uses htmlspecialchars() function for displaying titles, member names etc. And this htmlspecialchars() blindly translates every & found to <pre>&amp;</pre> including the ones found within Unicode characters.

So I went ahead and added my own htmlspecialchars_u() and recompiled php. My function looks at the next character to be not '#' before translating any &. Then I replaced all htmlspecialchars() in vB references with htmlspecialchars_u().

Though, it would be easier for me to skip calling htmlspecialchars() all together from the vB code, I thought I would keep the intended functionality.

I appreciate any feedback on whether my approach is correct one or not?

Thanks,
Annam

[Edited by Jisung on 12-05-2000 at 08:46 PM]

Wayne Luke
Wed 6th Dec '00, 2:12pm
There is no proper function to change to. In the message above, the author changed and recompiled PHP so that it would work with unicode characters more appropriately.

Many people are on virtual servers and are bound to be laughed at if they ask their providers if they can re-compile PHP. You will need to contact that author and get his code, recompile PHP and install it on your server.

The better course of action would be to thoroughly develop the new function, test it, and distribute it. Then you can submit it to the PHP development team and have it properly incorporated in a future version of PHP.

I think that there will be a lot more issues about unicode other than this one function though.

[Edited by wluke on 12-06-2000 at 01:14 PM]

Jisung
Wed 17th Jan '01, 8:29am
There was a strange thing happend to VB 1.1.4.
After I posted this thread, My VB has worked fine during last 2 months on searching for letters in Korean .
Yesterday, some VB files were screwed up for some reason thus I fixed & updated. But during that procedure, I rebuild search index and suddenly all search function for Korean words didn't work.
So I choose one thread and clicked "edit/delete" than updated (click " Submit Now" button) without any modification in that thread. After that Search could be performed just only with words in that thread.
My VB contained almost 1,000 threads and I don't want to update every threads.
Do you think this is still mySQL problem? Any solution?