Forum Stats

  • 3,826,581 Users
  • 2,260,667 Discussions
  • 7,897,008 Comments

Discussions

SQLplus can't display French characters

Aaron L.
Aaron L. Member Posts: 33 Red Ribbon
edited Oct 22, 2021 7:22PM in General Database Discussions

I was able to get some French and Spanish in our database, but SQLplus can't display the different (than my American English) characters.

I'm using SQLplus 19.0.0 on a 19.10.0.0.0 database. The database character set is WE8ISO8859P1.

SQL Developer reads if fine.

Example in French:

SQL Developer: APPUIE-TÊTE

SQLplus: APPUIE-T╩TE

Spanish:

SQL Developer: ÚNICAMENTE PARA

SQLplus: ┌NICAMENTE

On my Windows 10 machine (not the cloud server that has the db), I did what something on StackOverflow said and typed the following in a cmd prompt:

set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

Then ran sqlplus from that same command window. Still didn't work.

Tagged:
PeaceMonger

Best Answer

  • Solomon Yakobson
    Solomon Yakobson Member Posts: 19,472 Red Diamond
    edited Oct 22, 2021 11:00PM Answer ✓

    Make sure codepage is set to one that supports French/Spanish. For example:

    I:\>chcp
    Active code page: 437
    
    I:\>sqlplus [email protected]
    
    SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 22 18:52:51 2021
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Fri Oct 22 2021 18:49:29 -04:00
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> select 'APPUIE-TÊTE' french,'ÚNICAMENTE PARA' spanish from dual;
    
    FRENCH      SPANISH
    ----------- ---------------
    APPUIE-TETE UNICAMENTE PARA
    
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    I:\>chcp 1252
    Active code page: 1252
    
    I:\>sqlplus [email protected]
    
    SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 22 18:49:26 2021
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Fri Oct 22 2021 14:09:18 -04:00
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> select 'APPUIE-TÊTE' french,'ÚNICAMENTE PARA' spanish from dual;
    
    FRENCH       SPANISH
    ------------ ----------------
    APPUIE-TÊTE  ÚNICAMENTE PARA
    
    SQL>
    

    SY.

    PeaceMongerAaron L.

Answers

  • Mike Kutz
    Mike Kutz Member Posts: 6,195 Silver Crown
    edited Oct 22, 2021 8:18PM

    I don't think the single byte WE8ISO8859P1 supports multibyte French or Spanish Characters.

    I'm not sure if that would cause the difference. The problem might stem from your client OS or font used for terminal.

    IMO - you should take the time to convert the DB to UTF8. Especially if your data needs to support multiple languages.

    PeaceMonger
  • Solomon Yakobson
    Solomon Yakobson Member Posts: 19,472 Red Diamond
    edited Oct 22, 2021 11:00PM Answer ✓

    Make sure codepage is set to one that supports French/Spanish. For example:

    I:\>chcp
    Active code page: 437
    
    I:\>sqlplus [email protected]
    
    SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 22 18:52:51 2021
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Fri Oct 22 2021 18:49:29 -04:00
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> select 'APPUIE-TÊTE' french,'ÚNICAMENTE PARA' spanish from dual;
    
    FRENCH      SPANISH
    ----------- ---------------
    APPUIE-TETE UNICAMENTE PARA
    
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    I:\>chcp 1252
    Active code page: 1252
    
    I:\>sqlplus [email protected]
    
    SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 22 18:49:26 2021
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Fri Oct 22 2021 14:09:18 -04:00
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    SQL> select 'APPUIE-TÊTE' french,'ÚNICAMENTE PARA' spanish from dual;
    
    FRENCH       SPANISH
    ------------ ----------------
    APPUIE-TÊTE  ÚNICAMENTE PARA
    
    SQL>
    

    SY.

    PeaceMongerAaron L.
  • GregV
    GregV Member Posts: 3,085 Gold Crown

    Hi,

    In addition to what has been said, sometimes it's also necessary to change the police from the Command Prompt properties.

    For example, you can change the font to Lucida Console.

    PeaceMonger