American_america. WE8ISO8859P1, this character encoding is a Western European character encoding, which corresponds to. NET is the iso-8859-1 character encoding, so only need to change to the system's default character encoding on the line.
Workaround:
(1) server-side Reinstall Oracle
Select the character set that is consistent with the original unload data when reinstalling Oracle (in this case, US7ASCII).
Loads the original unloaded data.
This situation is only used for empty libraries and data with the same character set.
(2)
Write a function:
Code to copy code as follows
/**////<summary>
Convert Western European character encoding to GB2312
</summary>
<param name= "S" ></param>
<returns></returns>
public static string convert8859p1togb2312 (string s)
{
Return System.Text.Encoding.Default.GetString (System.Text.Encoding.GetEncoding ("iso-8859-1"). GetBytes (s));
}
(3) Forcibly modify the server-side Oracle current character set
Before loading data with the IMP command, log in to the System DBA user with Sql*plus on the client and execute the following SQL statement for the current Oracle database character Set modification:
Code to copy code as follows
SQL > CREATE DATABASE Character Set Us7ascii
* CREATE DATABASE Character Set Us7ascii
ERROR at line 1:
Ora-01031:insufficient Privileges
(3) Display garbled in Chinese
Installing the Oracle 10g on Redhat does not set the character set, using the operating system default character set: We8iso8859p1, modify the character set to: ZHS16GBK. Because the process is irreversible, you first need to back up the database.
1. Fully prepared database
Code to copy code as follows
2. Querying the current character set
Sql> SELECT * from nls_database_parameters where parameter= ' nls_characterset ';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
Nls_characterset WE8ISO8859P1
3. Close the database
sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
4. Start the database to Mount state
Sql> Startup Mount
ORACLE instance started.
Total System Global area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database buffers 100663296 bytes
Redo buffers 2924544 bytes
Database mounted.
5. Limit session
Sql> alter system enable restricted session (Www.111cn.net);
System altered.
6. Query the relevant parameters and modify
Sql> Show parameter job_queue_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Job_queue_processes Integer 10
Sql> Show parameter aq_tm_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Aq_tm_processes integer 0
Sql> alter system set job_queue_processes=0;
System altered.
7. Open the Database
sql> ALTER DATABASE open;
Database altered.
8. Modifying the character Set
Sql> ALTER DATABASE character set ZHS16GBK;
ALTER DATABASE character Set ZHS16GBK
*
ERROR at line 1:
Ora-12712:new character set must be a superset of the old character set
When the error occurs, the new character set must be a superset of the old character set, and the original character set is a subset of the new character set, which can be queried on the Oracle Official document for the character set inclusion relationship. Following the use of Oracle internal command Internal_use, skip the superset check, which is not recommended by the production environment.
Sql> ALTER DATABASE character set Internal_use ZHS16GBK;
Database altered.
9. Querying the current character set
Sql> SELECT * from nls_database_parameters where parameter= ' nls_characterset ';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
Nls_characterset ZHS16GBK
10. Close the database
sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
11. Start the database to Mount state
Sql> Startup Mount
ORACLE instance started.
Total System Global area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database buffers 100663296 bytes
Redo buffers 2924544 bytes
Database mounted.
12. Change the relevant parameters back to their original values
Sql> alter system set job_queue_processes=10;
System altered.
13. Open the Database
sql> ALTER DATABASE open;
Database altered.
From:http://www.111cn.net/database/oracle/45120.htm
Oracle Chinese garbled Solution Summary