i am using the newest devart.data.oracle (9.9.887).
the oracle db is 11g,i have made a test below:(i removed the license key)
OracleConnectionStringBuilder csb = new OracleConnectionStringBuilder();
csb.Direct = true;
csb.Server = "153.153.153.xxx";
csb.Port = 1521;
csb.Sid = "docare";
csb.UserId = "clinic";
csb.Password = "clinic";
csb.Unicode = true;
csb.LicenseKey = "...";
OracleConnection conn = new OracleConnection(csb.ConnectionString);
conn.Open();
string sql = "select t.NAME from view_cpc_patient_info t where rownum<=1";
var command = conn.CreateCommand(sql);
var reader = command.ExecuteReader();
reader.Read();
var value = reader.GetString(0);
return value;
when the result is simple-chinese, will be "??????"?
How to deal with it?i am very worried about this problem
Chinese garbled?
Re: Chinese garbled?
1. Make sure that Chinese data are stored correctly (not "??????") in your view_cpc_patient_info table. Try to read them via SQL Plus or SQL Developer.
2. The issue could be caused by the encoding of your operating system where you are running the code. In Windows, check Control Panel > Region > Administrative > Language for non-Unicode programs. Try setting system locale to the one that works with Chinese symbols.
3. If Oracle Client is installed on your workstation, retrieve the data with "Direct=false;" in the connection string. Does the issue persist?
4. Specify:
a) system locale of your operating system
b) the data type of your view_cpc_patient_info.NAME column
c) Chinese characters used for the test
d) the values of the following parameters on your Oracle Server (run "select * from nls_database_parameters")
NLS_RDBMS_VERSION
NLS_CHARACTERSET
NLS_NCHAR_CHARACTERSET
NLS_LANGUAGE
NLS_TERRITORY
2. The issue could be caused by the encoding of your operating system where you are running the code. In Windows, check Control Panel > Region > Administrative > Language for non-Unicode programs. Try setting system locale to the one that works with Chinese symbols.
3. If Oracle Client is installed on your workstation, retrieve the data with "Direct=false;" in the connection string. Does the issue persist?
4. Specify:
a) system locale of your operating system
b) the data type of your view_cpc_patient_info.NAME column
c) Chinese characters used for the test
d) the values of the following parameters on your Oracle Server (run "select * from nls_database_parameters")
NLS_RDBMS_VERSION
NLS_CHARACTERSET
NLS_NCHAR_CHARACTERSET
NLS_LANGUAGE
NLS_TERRITORY
Re: Chinese garbled?
tks,this issues i have modify,
the oralce server and client language is US7ASCII,
1.Not garbled in plsql,
2.Made a test framework version with devart.data.oracle 8.5 version ,that is Show Chinese normal.
3.OLEDB is normal.
4.use the newest devart.data.oracle is not normal.
the oralce server and client language is US7ASCII,
1.Not garbled in plsql,
2.Made a test framework version with devart.data.oracle 8.5 version ,that is Show Chinese normal.
3.OLEDB is normal.
4.use the newest devart.data.oracle is not normal.
Re: Chinese garbled?
Please answer these questions.Shalex wrote: ↑Thu 26 Dec 2019 20:01 2. The issue could be caused by the encoding of your operating system where you are running the code. In Windows, check Control Panel > Region > Administrative > Language for non-Unicode programs. Try setting system locale to the one that works with Chinese symbols.
3. If Oracle Client is installed on your workstation, retrieve the data with "Direct=false;" in the connection string. Does the issue persist?
4. Specify:
a) system locale of your operating system
b) the data type of your view_cpc_patient_info.NAME column
c) Chinese characters used for the test
d) the values of the following parameters on your Oracle Server (run "select * from nls_database_parameters")
NLS_RDBMS_VERSION
NLS_CHARACTERSET
NLS_NCHAR_CHARACTERSET
NLS_LANGUAGE
NLS_TERRITORY