It has been plagued by the Unicode problem of Oracle 9i nvarchar for a long time. On the Internet, I can see an article KB-Oracle 9i nvarchar Survival Guide. To solve this problem in C #, I want to know how to solve it in Delphi 2009 (Delphi 2009 now supports Unicode), or how Use SQL statement to insert Unicode characters in PL/SQL.Appendix KB-Oracle 9i nvarchar survival principle original KB-Oracle 9i nvarchar survival rules Same Event Response: A characterset is set to zht16big5 Oracle 9i data records. The nvarchar2 character of a table does not accept any non-big5 characters at all. It will become "? ". After nearly a month, I have repeatedly reviewed multiple tools and methods, I also asked a friend, asked Oracle Support, and checked Oracle kb. As a result, almost all points to --- "oracle 9i nvarchar cannot accept non-big5 characters in the non-utf8 character set, but it will be regarded as a problem. The only way to solve this problem is to set the token character set Utf8, or merge both client and server to 10g R2 ". (Note: The final result of the signature later is incomplete, but at least for the n'... 'representation) Until today, we have the chance to repeat a simple sample code, and we happen to have used the checking tool again to figure out some ideas. First, why is it true? 1. Make sure that your ruler is straight before the limit is reached! This is probably the most serious part of the crash: Can the information query tool you are using correctly display non-big5 characters? Since the WINNT era, the use of the MS tool and tool has rarely worried about Unicode compatibility issues. However, this commonly used Oracle tool is almost completely unavailable! Oracle's own sqlplus is not supported after 9i, and the famous toad does not seem to work! The Aqua data studio developed in Java As long as the UI is set to support the TTF font of Unicode, the encoding is OK. For another queryexpress with. Net encoding, if Oracle is selected Driver (meaning Microsoft ole db provider for Oracle instead of Oracle provider Ole db), you can also implicitly display Unicode characters. If a tool is used, it is possible that the insert operation is successful. Maybe the result is played by the detection result of the successful insert operation at the beginning, and a large circle is written in the White Circle. [2006/12/28 update] Also I forgot to say that. Net console application does not support either. Unicode, Which is output in ANSI mode, so it depends on OS settings. In Windows, the non-unicode encoding system is big5, which allows the Console I spent more than half an hour on app testing code... 2. Make sure that he understands English before using English for a contract with a foreigner. MS I have been using SQL for N years, and my knees are recognized as n'... ', which indicates the nchar character. This method is available in Oracle 9i is also supported, but unfortunately the processing method is quite different from what we imagined. That is, the Unicode string indicated by n'... 'is used. 9i data records can also be parsed using their own character sets to convert unrecognized characters? Or will it be too embarrassing to store the information again? Is n channels before the string heartbleed? I didn't think of n'... 'as a black heart when the data character set was big5. I spent a lot of time doing some manual work. N '... 'Finally, with the help of an Oracle competitor's creden, the author pushed the results out. 'unless the item character set is changed to utf8, otherwise, nchar can only accept the tragic conclusion of the big5 character. (Oracle files provide some alternatives, such as nchar (505055), unistr ('/20ac'), CHR (14844588 using nchar_cs ), however, we need to change the program with the unique bit value to this kind of virtue, so that people want to write a "character) In the end, use the original.. Net sample is retained. In addition, uses queryexpress's Oracle driver mode to query metrics, we can see that the Oracle data table shows the first of the three coolders (which are the non-big5 characters in this time, I got my eyes on the scene ~~~ It is true that the nchar and nvarchar of Oracle 9i are not black-hearted, but they only need to pay attention to each region, be careful when you are able to properly store data. I recommend that you use. Net to insert non-big5 characters into Oracle 9i big5 data sources: 1. Use cmd. parameters to specify the number of parameters, instead of using ad-hoc to group n '...' Oracleconnection Cn = new oracleconnection (cnstr ); Oraclecommand cmd = new oraclecommand ( "Insert into nchartest values (: VC,: NVC)", CN ); Cmd. Parameters. Add ("VC", oracledbtype. varchar2). value = ""; Cmd. Parameters. Add ("NVC", oracledbtype. nvarchar2). value = ""; CN. open (); Cmd. executenonquery (); CN. Close (); 2. Remember to explicitly declare oracledbtype. nvarchar2 (ODP. net) or Oracletype. nvarchar (system. Data. oracleclient ). My colleagues' negligence is to use it. Cmd. Parameters. Add ("VC", "") method. The oracledbtype set by. NET is not nvarchar. 3. According to the official Oracle file, the 10g R2 version has removed the issue of nchar not being resolved. |