4 Replies Latest reply on Aug 22, 2012 5:28 AM by Duncan Gardner

    What is the reverse of UNISTR?

    Duncan Gardner
      How do I convert unicode characters into a unicode string? I thought it might be utl_raw.cast_to_raw, but that doesn't work consistently - I get a a six-character HEX string, expecting four for charcacers I enter via a SQL statement.

      SELECT x, utl_raw.cast_to_raw(x), y, utl_raw.cast_to_raw(y)
      FROM (SELECT UNISTR('\4E2D') as x, '中' AS y FROM DUAL);

      results in:

      "中" "4E2D" "中" "E4B8AD"

      My database is AL32UTF8. I'm using SQL Developer, with NLS_LANG set to ENGLISH_AUSTRALIA.AL32UTF8. My Windows 7 environment is English Australia.

      I suspect it is some sort of client issue. Can I resolve this without changing my PC to the target language in it's entirety?