OK, I took your problem from the other end. I tried to see what
you're trying to store. I entered your 0x9F54 in a text file (using
binary editor) and opened it in Firefox.
Guess what! When the encoding is set to Big5, I just got a "?".
But if I switch to Big5-HKSCS, I've got the "麁" c
On Wed, April 11, 2007 6:47 am, Man-wai Chang wrote:
> how do you do string comparison in utf-8? say the user entered a
> chinese
> string the browser and you need to search for the string in the MySQL
> table using PHP.
*IF*
the page that got the initial data was UTF-8 in its HTTP Headers and
in
Man-wai Chang wrote:
> how do you do string comparison in utf-8? say the user entered a chinese
> string the browser and you need to search for the string in the MySQL
> table using PHP.
>
How? Of course in the usual PHP way! (Be warned that we're getting
more and more off-topic. This is
OK, I've spent five minutes to try to understand what you're doing.
There're something I don't understand:
1. You use dbase_open("/home/bt/canton.DBF",0);
which seems that you open a database file directly.
Well, I don't do like this. I use mysql_connect("localhost",
"username", "some_passwor
how do you do string comparison in utf-8? say the user entered a chinese
string the browser and you need to search for the string in the MySQL
table using PHP.
--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
Seak, Teng-Fong wrote:
> Anyway, you should look at the positive side of using Unicode
> instead of the dinosaur encoding, sorry, I mean Big5 :p Hard drives
> (and RAM) nowadays are getting real big, string size should be
>
I wanted to mean: string size should NOT be considered . :p
Man-wai Chang wrote:
>> On the other hand, I remember you talked about the type of that
>> column to be char(2). Have you specified what encoding it's using?
>> Moreover, I hope you're not using legacy encoding like Big5 or GB. Use
>> Unicode (UTF-8) if your database is a brand new one.
>>
screenshot of the error:
--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
^ ^ 19:25:01 up 3 days 2:16 1 user load average: 1.03 1.08 1.08
news://news.3home.net news:/
> Well, show us a part of your code. Do var_dump($value) before you
> enter it into the database, and see if it still says 0x9f54.
The error:
string(2) ""
Duplicate entry '' for key 1
--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Fo
> On the other hand, I remember you talked about the type of that
> column to be char(2). Have you specified what encoding it's using?
> Moreover, I hope you're not using legacy encoding like Big5 or GB. Use
> Unicode (UTF-8) if your database is a brand new one.
Unfortunately, I am still usi
Man-wai Chang wrote:
>>> MySQL? MSSQL? PgSQL?
>>> Tijnema
>>>
>> It seems he wanted to insert a Chinese character with that hex value.
>>
>
> Yes... I tried the insert with PHP, including the use of
> mysql_real_escape_string(), but MySQL still gave me a blank only.
Well, this
On 4/1/07, Man-wai Chang <[EMAIL PROTECTED]> wrote:
>> MySQL? MSSQL? PgSQL?
>> Tijnema
> It seems he wanted to insert a Chinese character with that hex value.
Yes... I tried the insert with PHP, including the use of
mysql_real_escape_string(), but MySQL still gave me a blank only.
Well, sh
>> MySQL? MSSQL? PgSQL?
>> Tijnema
> It seems he wanted to insert a Chinese character with that hex value.
Yes... I tried the insert with PHP, including the use of
mysql_real_escape_string(), but MySQL still gave me a blank only.
--
.~. Might, Courage, Vision, SINCERITY. http://www.linux
13 matches
Mail list logo