Home > Back-end >  Delphi7 insert into the inserted into the database of Chinese display a question mark
Delphi7 insert into the inserted into the database of Chinese display a question mark

Time:10-12

Insert into sys_user (usercode, username) values (' ' '+ edit1. Text +' ' ', ' ' '+ edit2. Text +' ' ') the corresponding edit2 username here. The text is in Chinese, Chinese are turned into a question mark after inserted into the database, the database is informix username in the data table is char type connection mode is adoconnection + adoquery, adoconnection is through the ini file to connect to the database configuration, is a string of odbc, informix database character set en_US. 819
On the premise of do not change the database, how to modify the statement can be shown in the data table Chinese
Has tried to put the string plus DB_LOCALE=zh_CN. 57357; CLIENT_LOCALE=zh_CN. 57357 still doesn't work, N ' ' '+ edit2. Text +' ' '

CodePudding user response:

The database character set problem!!!! But read it should be normal, mysql operation also met this problem before,

CodePudding user response:

Using informix database, it should be is the question about which character set, but I can't move the server again, can only be changed in the statements, warrior, the Chinese after insert into the question how to solve?

CodePudding user response:

Not so easy!!

CodePudding user response:

Take a look at your database character set is Chinese character set

CodePudding user response:

Estimates that can only change the character set, do not know how, the degree of processing,

CodePudding user response:

Estimation is the problem that the database character set, try to change the database character set anyway, ORACLE is like this

CodePudding user response:

This, in general, more difficult

CodePudding user response:

Brother try the
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

CodePudding user response:

Bad treatment, should be the problem of character set

CodePudding user response:

To change the database character set

CodePudding user response:


Where each receiving data to join N good, just like the eight floor,
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

CodePudding user response:

The
reference 11 floor zhangzhen_927116 reply:

Where each receiving data to join N good, just like the eight floor,
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

This really can do it? Learned,
N is what mean?
Other languages can also?

CodePudding user response:

The
reference 11 floor zhangzhen_927116 reply:

Where each receiving data to join N good, just like the eight floor,
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

I can do it tried, but in the database field to unicode,

CodePudding user response:

A data set of characters, it should be of the operating system support for Chinese characters,

CodePudding user response:

reference 13 floor ynquan reply:
Quote: reference 11 floor zhangzhen_927116 response:


Where each receiving data to join N good, just like the eight floor,
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

I tried to do, but in the database field to unicode,

The need to modify, direct strings with respect to OK

CodePudding user response:

reference 13 floor ynquan reply:
Quote: reference 11 floor zhangzhen_927116 response:


Where each receiving data to join N good, just like the eight floor,
Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')

I tried to do, but in the database field to unicode,

And solved the problem after remember "posts, or others won't want to answer your question
  • Related