Skip to Main Content
  • Questions
  • Converting string from WE8DEC to AL32UTF8

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, mima.

Asked: July 24, 2025 - 10:17 pm UTC

Last updated: July 25, 2025 - 2:52 pm UTC

Version: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0

Viewed 100+ times

You Asked

converting string where we have many special characters because of French from 'WE8DEC' to 'AL32UTF8' result of missing the characters, what to do?

example:

select CONVERT('À è Ë','WE8DEC','AL32UTF8' ) from dual;


results is ¿ ¿

and Chris said...

The second parameter of CONVERT is the destination, so you're converting to WE8DEC, not from it!

Also note:

Oracle discourages the use of the CONVERT function in the current Oracle Database release. The return value of CONVERT has a character data type, so it should be either in the database character set or in the national character set, depending on the data type. Any dest_char_set that is not one of these two character sets is unsupported. The char argument and the source_char_set have the same requirements. Therefore, the only practical use of the function is to correct data that has been stored in a wrong character set.

https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/CONVERT.html

So the question is: why are you using CONVERT?

If it's because you have characters appearing incorrectly in your client, you need to set NLS_LANG (and possibly chcp on Windows) to display these correctly.