Home > Net >  The.net connection MyCat Chinese garbled bosses to help
The.net connection MyCat Chinese garbled bosses to help

Time:09-27

I use navicat link MyCat not gibberish, but use the.net mysql ado to connect MyCat query or add Chinese will be garbled

My connection string: server=192.168.2.132; The database=mycat_kh; uid=sa; pwd=123456; Pooling=true; The Connection Lifetime=120; The Connection Timeout=120; Port=8066; Charset=utf8

Database: used 2008 r2

Mycat connection string: & lt; WriteHost host="hostM1" url="jdbc:sqlserver://sql.pidiqi.com: 3433" user="* * * * *" password="* * * * * * *" & gt;

CodePudding user response:

Mycat connection string can be set inside Charset=utf8? MyCat used ha, it is recommended that look at adding this,
And I think when submit data inside the code probability is small, do you see in the program is stil in it?

CodePudding user response:

Is essentially a default Unicode, not utf8,

CodePudding user response:

refer to the second floor datafansbj response:
is essentially a default Unicode, not utf8,


But I connected with navicat mycat is not garbled, still say ado default specifies the code format, and navicat is not specified? So not garbled

CodePudding user response:

reference 1/f, the rabbit family - second brother reply:
mycat connection string can be set inside Charset=utf8? MyCat used ha, it is recommended that look at adding this,
And I think when submit data inside the code probability is small, do you see in the program is stil in it?


Mycat specified coding format is on the server. The specified in the XML file, connection string can't specify code, not set seems to be no effect,

CodePudding user response:

You see if the program inside the code, haven't submit to the database? Debugging and see?

CodePudding user response:

refer to fifth floor rabbit family - second brother reply:
you see if the program inside the code, haven't submit to the database? Debugging see?


When debugging is not gibberish, but in the request mycat, mycat parse the statement in Chinese will be garbled

CodePudding user response:

refer to 6th floor qq_34292420 response:
Quote: refer to fifth floor rabbit family - second brother reply:

You see if the program inside the code, haven't submit to the database? Debugging see?


When debugging is not gibberish, but in the request mycat, mycat parse the statement in Chinese will be garbled


For example: insert into KH_TuanDui (MingCheng, ShuoMing ChuangJianRen, ChuangJianShiJian, XiuGaiRen, XiuGaiShiJian) values (' test ', 'test', ', ', ', ');
He the debug statements into: execute mutinode query insert into KH_TuanDui (TDID, MingCheng, ShuoMing ChuangJianRen, ChuangJianShiJian, XiuGaiRen, XiuGaiShiJian) values (1200258893532499968, '???? § ° ', 'e??????? ', 'a', '2019/11/29 3:41:32', NULL, ' ')

CodePudding user response:

The code is written by cs? Check. Cs file coding with the database coding are consistent,
  •  Tags:  
  • C#
  • Related