2

Our application has database Oracle 12c and Client in Java.

I wonder when using plsql developer for oracle then symbols i.e.° (degree) are displayed using system's language setting or plsql developer setting or oracle server character setting?

We have some symbols like degree which are displayed correct in some machine and some machine shows garbage character. How to do this setting to display symbols same in all systems?

I tried to store chr(176) instead of degree symbol (°) in database still no luck. It shows correct in my systems but shows null in my colleague's machine.

GMB
  • 216,147
  • 25
  • 84
  • 135
  • 1
    You basically need to use Unicode everywhere. In Oracle that involves [using `NVARCHAR2` rather than `VARCHAR2`](https://stackoverflow.com/questions/4508351/difference-between-varchar210-char-and-nvarchar210) (or configuring the entire instance for Unicode). But this is really too broad and there's no magic button. You need to undesrtand how text encoding works and ensure you're doing it correctly in every step. – Álvaro González Jan 03 '19 at 11:21
  • 2
    Check the session NLS settings for both you and your colleague, they must be different. – g00dy Jan 03 '19 at 11:21
  • @g00dy, the client is in Java. However, Java does not use the client NLS Settings (at least not `NLS_LANG`), see [Database JDBC Developer's Guide](https://docs.oracle.com/database/121/JJDBC/global.htm#JJDBC28643) – Wernfried Domscheit Jan 03 '19 at 12:23
  • Which tool do you use to check the data? – Wernfried Domscheit Jan 03 '19 at 12:25
  • pl/sql developer isn't java, but oracle sql developer is java..when java just make sure your display font supports the characters involved (which will be unicode) – thatjeffsmith Jan 03 '19 at 15:07

1 Answers1

0

When I need the encoding for any special character I do a Select ASCII('°') from dual. Then you can use the integer given as CHR(####)