Page 1 of 1

SQLRDD+MYSQL Chinese Collation Problem

Posted: Fri May 17, 2013 6:56 am
by kokookao2007
hi:

Any one use SQLRDD + MYSQL with Chinese Collation?

Created a Database with collation big5_chinese_ci or collation gb2312_chinese_ci or collation gbk_chinese_ci ,
I can't show Chinese word for FWH+xHarbour+SQLRDD.

Created a Database with utf8_general_ci,
work fine for FWH+xHarbour+SQLRDD , But show Chinese word for Phpmyadmin tool.

How can Chinese Collation work for both FWH+xHarbour+SQLRDD and Phpmyadmin ?

--
Best Regards
--------------------------------------------------------------
kokoo KAO

Re: SQLRDD+MYSQL Chinese Collation Problem

Posted: Fri May 17, 2013 4:56 pm
by lucasdebeltran
Hello,

I think you must set proper codepage in Harbour. For example, for Spanish:

HB_LangSelect("ES")
HB_CDPSELECT("ESWIN")

Hope it helps.

Re: SQLRDD+MYSQL Chinese Collation Problem

Posted: Sat May 18, 2013 2:50 am
by kokookao2007
hi lucasdebeltran :

Thank you, I will try it and feedback .

Re: SQLRDD+MYSQL Chinese Collation Problem

Posted: Mon Jun 17, 2013 8:19 am
by kokookao2007
hi :

I test the the solution work for SQLRDD + Chinese.

for Chinese Traditional :
1. Create a database Collation with utf8_generial or utf8_unicode or
big_chinese_ci.
2. add the command After Connect to MYySQL
cCOMM:=" SET NAMES 'big5' ;" +;
" set character_set_client='big5'; "
nERR := oSQL:EXEC(cCOMM)
nERR := oSQL:COMMIT()

for Chinese Simple :
1. Create a database Collation with utf8_generial or utf8_unicode or
gb_2312_chinese_ci or gbk_chinese_ci.
2. add the command After Connect to MYySQL
cCOMM:=" SET NAMES 'gb_2312' ;" +;
" set character_set_client='gb_2312'; "
nERR := oSQL:EXEC(cCOMM)
nERR := oSQL:COMMIT()