0

I am using PLSQL developer to work with oracle db. When I compile a view which stores code like this:

select 'xidmət' as service from dual

the 'ə' character in the string becomes '?' character.

I think it's some oracle or plsql developer configuration problem, but I don't know what.What do you think the problem is?

Hikmat G.
  • 2,591
  • 1
  • 20
  • 40
  • Check the settings of the Database, character set and *nls* settings. Check the same on the client you use to connect to the DB, as it might have some setting that overwrite the ones of the DB for the current session. Check the encoding this character `'ə'` belongs to. If it's in UTF-8, then make sure everything else is utf-8 as well. Since you're running a select statement, I think that the client settings are more important here, if you don't plan to put this into the DB. – g00dy May 15 '17 at 06:09
  • I don't know whether PLSQL Developer uses `NLS_LANG` settings. If yes, follow this guide: http://stackoverflow.com/questions/33783902/odbcconnection-returning-chinese-characters-as/33790600#33790600 – Wernfried Domscheit May 15 '17 at 11:47

2 Answers2

1

Need to configure your systems NLS_LANG parameter, according to your language preferences. Here's a link:

http://www.nazmulhuda.info/setting-nls_lang-environment-variable-for-windows-and-unix-for-oracle-database

For example, we have letters like "ąčęėįšųū". So in order to see them in pl/sql, we set NLS_LANG with value "LITHUANIAN_LITHUANIA.BLT8MSWIN1257".

Hope it helps. Good luck.

Ychdziu
  • 435
  • 5
  • 10
1

First, check what your character set is using this:

select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

Then set your NLS_LANG environment variable to AMERICAN_AMERICA.CHARSET where CHARSET is the value found with that select. If you are in Windows, you will have to go to Control Panel, System, Advanced, Environment Variables, and set NLS_LANG under System variables.

Oracle does at least a 'one-pass' conversion between client and database, but the problem is that there are so many layers between client and database, including your client software, that it is usually better to match your client NLS_LANG with the database setting.

It also depends how that character was inserted. It might have been inserted using a different client tool using a different NLS_LANG, so you might have to update your extended ASCII characters (or foreign characters) before you get a consistent view from your select.

sandman
  • 2,050
  • 9
  • 17