I’m working with Oracle database where the ‘NLS_CHARACTERSET’ is set to ‘AR8ISO8859P6’, and I’m using the ‘nvarchar2’ datatype for my columns. When I select Kurdish text from my table, it displays correctly:
SELECT g1.b1
FROM x_table g1
WHERE g1.id = 1;
Output: یفگێدەوفتیئدوگێچەدوئگێچەژودگێکسچودگچێکوخچهگەژوخگچهەژدو
However, when I use json_object or json_arrayagg, the output contains question marks:
SELECT json_object(KEY 'Q3' VALUE g1.b1)
FROM x_table g1
WHERE g1.id = 1;
Output: {“Q3″:”?ف??د?وفت?ئدو????دوئ?????ود???س?ود????وخ?ه???وخ??ه??دو”}
SELECT json_arrayagg(g1.b1)
FROM x_table g1
WHERE g1.id = 1;
Output: [“?ف??د?وفت?ئدو????دوئ?????ود???س?ود????وخ?ه???وخ??ه??دو”]
What can I do to get the correct output without question marks?
Note: I need a solution using SELECT statements, without changing the database character set or settings.