0

I consider that is the Operative System, because applications in Java and PHP have the same problem. I made this procedures:

In first place:

I changed the NLS_CHARACTERSET with the next lines:

conn /as sysdba
shutdown immediate;
startup mount;
ALTER SYSTEM ENABLE RESTRIcted session;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
alter database open;
UPDATE PROPS$ SET VALUE$ = 'AL32UTF8' WHERE NAME = 'WE8MSWIN1252';
commit;
shutdown immediate;
startup;

After

SQL> SELECT * from NLS_DATABASE_PARAMETERS WHERE parameter 
IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');

PARAMETER VALUE
—————————— —————————————-
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8

THE OUTPUT FORM MY COMPUTER WAS: AMERICAN,AMERICA,AL32UTF8, respectively

1-Tutorial:

Determine the NLS_LANG value. In the data warehouse database, run the command

SELECT * FROM V$NLS_PARAMETERS

Make a note of the NLS_LANG value, which is in the format [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]. For example: American_America.UTF8 For Windows: Navigate to Control Panel > System and click the Advanced tab. Click Environment Variables. In System variables section, click New. In the Variable Name field, enter NLS_LANG. In the Variable Value field, enter the NLS_LANG value that was returned in Step 1. The format for the NLS_LANG value should be [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]. For example: American_America.UTF8.

2-Tutorial: I entered in a REGEDIT in HKEY_LOCAL_MACHINE>SOFWTARE>Oracle>KEY_XE and I changed the NSLANG file, with the value_ American_America.AL32UTF8.

I reboot my laptop and I still have the same problem. It is just that in one time, all the characters turned into other characters.

  • 1
    Do you have a backup of your database from before you corrupted it? Directly updating the data dictionary is highly non-supported and almost certainly has side-effects that you don't understand. Step 1 will be to restore your database backup from before you made this change. – Justin Cave May 14 '16 at 04:45
  • No problem. I can uninstall if you want – Juan Camacho May 14 '16 at 08:23

2 Answers2

0

As suggested by Justin Cave first you should restore (or dispose) your database. On the other hand, maybe you had good luck, because UPDATE PROPS$ SET ... WHERE NAME = 'WE8MSWIN1252'; should update 0 rows since there is no parameter named WE8MSWIN1252.

Usually it should be sufficient to set NLS_LANG according to the character of your application, in this case your java and/or PHP settings. You can do it either as Environment variable or in Registry. However, I do not know if java and PHP reads the Registry settings or if they just rely on Environment variables.

Check also Registry key HKEY_LOCAL_MACHINE>SOFWTARE>Wow6432Node>Oracle>KEY_XE -> TNS_ADMIN in case you installed the 32 bit Oracle Client.

See this answer to get more details: OdbcConnection returning Chinese Characters as "?"

Community
  • 1
  • 1
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • Thanks. I discovered a Windows console (SQL Command Line) has a problem with the input of characters. It was the problem because all my configuration is correct with AL32UTF8 and your option WE8MSWIN1252 also. Linux if define the input type but Windows not, or yes? – Juan Camacho Jun 10 '16 at 19:13
0

I posted about NLS_LANG at OTN (Oracle Technology Network), here is a link. https://community.oracle.com/thread/3907535?start=0&tstart=0 You may find it useful.

Red flag: Why are you trying to change your local NLS_LANG character set component, for your own local machine, to the character set used by the database? If you are wondering "what the heck that mathguy mean with this question?" - please read the notes I linked to , or if you have the time and inclination, the "original" - the NLS_LANG FAQ http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html