If you look at USER_SOURCE, you will see that the source code that is stored / interpreted by the database will be in the VARCHAR2 column, so use the database character set. Therefore, your source code should be in WE8ISO8859P1.
Theoretically, if the client and the database use the same character set, then the database will not try to translate the character set, and you can sneak into a sequence of bytes, which, according to the database, are WE8ISO8859P1, but will make sense in unicode . However, at some point, someone will use the wrong client and it will break.
You do not need Unicode for identifiers, etc. in the code, so I assume it is in string literals. You better keep them in a table (NVARCHAR2 column) and select them in your code, rather than hard code them. If this is not possible, you can use UNISTR and hard-code the corresponding hexadecimal values.
Gary myers
source share