Insert with accents in Oracle

12

When I make a INSERT for example:

INSERT INTO TESTE (NOME) VALUES ('INSCRIÇÃO ESTADUAL');

You're saving to the table this way:

  

STATE ENROLLMENT

And the screen displays "INSCRIÃÃO ESTADUAL" .


I am using Oracle SQL Developer , when I enter the table and change it in the hand, then yes it saves correctly:

  

STATE ENROLLMENT

And the screen correctly displays "INSCRIÇÃO ESTADUAL" .


NLS Configuration

Running%with%

I even looked at the configuration of my SELECT PARAMETER, VALUE FROM NLS_DATABASE_PARAMETERS and apparently it's okay, is there any way to change the encoding at the time of the INSERT?

    
asked by anonymous 15.06.2015 / 19:26

2 answers

2

Maybe, this will solve your problem, if you do not solve the error, then you will find the solution together. Create an environment variable named NLS_LANG, with the value .WE8ISO8859P1. As shown below.

Ifitdoesnotresolve,readthisarticle: link

    
15.06.2015 / 19:42
1

Use NLS_LANG environment variables to configure correctly, as it should be entering as ASCII (7 bits), use export for Linux and set for Windows.

If the input data is encoded in a Windows environment:

export/set NLS_LANG='AMERICAN_AMERICA.WE8MSWIN1252'

On ISO-8859-P1 (Unix):

'export/set NLS_LANG='AMERICAN_AMERICA.WE8ISO8859P1''

In UTF-8:

export/set NLS_LANG='AMERICAN_AMERICA.AL32UTF8'
    
24.06.2015 / 07:06