Given
Oracle 19c in WE8MSWIN1252 charset.
Processing the JSON in UTF-8 using different functions.
Test
DECLARE
c_json_utf8 VARCHAR2(32000) := CONVERT('{"a":"' || CHR(246) || '"}', 'AL32UTF8');
l_obj json_object_t;
BEGIN
l_obj := NEW json_object_t(c_json_utf8);
dbms_output.put_line('json_object_t.get_string: ' || l_obj.get_string('a'));
dbms_output.put_line('json_value: ' || json_value(c_json_utf8, '$.a'));
FOR rec IN (
SELECT *
FROM JSON_TABLE(c_json_utf8, '$'
COLUMNS(a VARCHAR2 path '$.a')
)
) LOOP
dbms_output.put_line('json_table: ' || rec.a);
END LOOP;
END;
/
Result
json_object_t.get_string: ö
json_value: ö
json_table: ö