Reputation: 627
I have a problem when inserting values into my Oracle database. I have to insert French characters like à
or è
and when I try to insert them through an INSERT statement it will convert the character to ¿
or ?
.
Is there any possibility to set the encoding of that specific script, or what can I do in this situation ?
Thank you
Upvotes: 3
Views: 2421
Reputation: 627
I have fixed this problem by adding an Environment Variable called NLS_LANG with the value .AL32UTF8 . This worked even though the database has as language American and territory America. The problem that I have faced here was that once I changed the NLS_LANG variable, it started to encode my characters also in the application.
Also you can try to change the encoding of the script that you are running. For example I have used ANSI encoding (you can do it by opening a script in notepad++ and from the Encoding menu, select Convert to ANSI) and it worked properly.
Thank you guys for your help :)
Upvotes: 1
Reputation: 6604
Usually you would set the character set when you install your database. You can, however, change it post-setup if required (Look up CSALTER
). If your database needs to support multiple languages, then you should take a look at this: Supporting Multilingual Databases with Unicode
Upvotes: 1