CodePudding user response:
Must first determine the database character set for AMERICAN_AMERICA. Us7ascii or client NLS_LANG Settings for AMERICAN_AMERICA. Us7ascii, if the latter, this setting only, according to the decision does not affect actually stored in the database, you can change, don't change rawtohex function can also be used to obtain the original code of data: select rawtohex (XXX) from... ,If the former (use up sqlplus client tools to connect to the database, enter the select * from nls_database_parameters; Look at the output), that is more troublesome, US7ASCII 7-bit ASCII code, the highest is 0, so Chinese information lost, when I was put into read also can't be right, only before you write code, such as BASE64, read it out again after decoding,
CodePudding user response:
Hello, thank you very much for the reply, the second floor. The server database character set is AMERICAN_AMERICA us7ascii, this is certain, I set the environment variable in the client machine NLS_LANG is SIMPLIFIED CHINESE_CHINA. After us7ascii by PLSQL query is can show Chinese, but through the Delphi don't know how to convert, read out is stil in ChineseCodePudding user response:
Then you put the NLS_LANG is SIMPLIFIED CHINESE_CHINA UTF8, D7 read UTF8Decode again, according toCodePudding user response:
Ok, I'll give it a tryCodePudding user response:
Edit2. Text:=Utf8Decode (YlQuery_Data [' payer ']); Still gibberish, I use the data connection component is unidac, I here set UniConnOracle SpecificOptions. Values: [' Charset ']='SIMPLIFIED CHINESE_CHINA. UTF8'; Or not,CodePudding user response:
It should be writing data when the database is missing information, you can only use first compatible US7ASCII codes such as BASE64 code first, then write, read after decoding first, then, according toCodePudding user response:
But through PLSQL connection, direct inquiry can show Chinese, asked the developers said they showed they also is no problem, we can only read their dataCodePudding user response:
You don't use D7, in D2009 + support unicode version,CodePudding user response:
Oh oh, I see. Anyway, thank you very muchCodePudding user response: