0

I check my db,and seems to be UTF8 complaint

select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET';

PARAMETER        |VALUE
NLS_CHARACTERSET |AL32UTF8

But when i do a search on a VIEW

SQL> select titolo,anno,genere from generale where titolo like  '%Roma dr%' order by titolo;

TITOLO                                                      |ANNO   |GENERE
------------------------------------------------------------|-------|------------
Roma drogata: la polizia non pu?? intervenire               |1975   |Poliziesco

1 row selected.

Elapsed: 00:00:00.02

The two ?? tell me something is wrong. Any solution to give a full utf8?Thanks

  • 3
    That's your SQL client (presumably SQL*Plus) which cannot display those characters. You need to use a font that can display them and in case of SQL*Plus you also need to switch the command line from which you start SQL*Plus to UTF-8 (I think that is done through chcp 65001) – a_horse_with_no_name May 18 '15 at 6:34
  • I'm on unix,i had try LANG="utf8" and LANG="it_IT.utf8" but no success,of course those variables were exported – elbarna May 18 '15 at 22:19
  • I have set export NLS_LANG=Italian_ITALY.UTF8 now speak italian,but still ?? instead of ò – elbarna May 18 '15 at 22:28
  • What do you get by locale charmap? – Wernfried Domscheit May 19 '15 at 6:31
  • it's all it_IT.utf8 – elbarna May 19 '15 at 17:35
1

Based on your reply of

SELECT ASCIISTR(titolo) FROM generale WHERE titolo LIKE 'Roma drogata%;

TITOLO                                                      
----------------------------------------------------------------
Roma drogata: la polizia non pu\FFFD\FFFD intervenire

You get Roma drogata: la polizia non pu?? intervenire because it has been inserted wrong into your database, i.e. when the record was inserted the client had set NLS_LANG wrong.

Unicode character U+FFFD is this one: REPLACEMENT CHARACTER

Probably the SQL script was saved as UTF-8 but NLS_LANG was set to ISO-8859-1 or Windows-Cp1252 or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.