I have a database with NLS_CHARACTERSET = AL32UTF8.
Using JDBC with the Oracle thin driver, and a prepared statement with a bound parameter, I write the UTF-16 java String "\uD83D \uDE33" to a VARCHAR2 field.
Using SQLPLUS and selecting the field with utl_raw.cast_to_raw, I can see the following raw values: EFBFBD20EDB8B3, ie: "\uFFFD \uDE33"
When I read the field back into a UTF-16 java String using JDBC, the unicode values get converted to the replacement char, ie: "\uFFFD \uFFFD".
How can I get the original Unicode string back out?
Because what I read back is "\FFFD \FFFD", if I use this value in a where condition, it will never match what is in the database.