Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle SQL Developer environment encoding

I have Oracle SQL Developer (3.1.07) and I'm trying to work with a database that uses WE8ISO8859P1 encoding:

SELECT * FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';

I have problems with saving packages that contains unicode symbols. When I open previously saved package all unicode symbols are turned to '¿'.

What settings do I have to change to make SQL Developer keep those symbols? I've tried to set environment encoding to 'ISO-8859-15' and some other encodings, but it won't help.

like image 908
ULazdins Avatar asked Mar 09 '12 09:03

ULazdins


1 Answers

If your database encodes text to a non-unicode single-byte encoding (e.g. ISO-8859), any symbol not present on the character table will be seen as invalid and replaced by a placeholder. You can't go back from that, the information is lost.

That can be usually worked around when storing data, but as for source code, you cannot control how Oracle would encode your strings.

If your database is configured to use such encoding scheme you're probably not supposed to write code that violates its rules.

like image 151
mycelo Avatar answered Oct 11 '22 03:10

mycelo