Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6073009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:13:25+00:00 2026-05-23T10:13:25+00:00

When inserting strings in an oracle database, some national characters are replaced with question

  • 0

When inserting strings in an oracle database, some national characters are replaced with question marks, even though they are
inserted in an NCHAR or NVARCHAR column – that should be able to handle all Unicode characters.

This happens using either Oracle’s SQL Developer, sqlplus or using the JDBC driver.

The database NLS_CHARACTERSET is set to WE8ISO8859P1 (western european iso-8859-1)
The NLS_NCHAR_CHARACTERSET used for NCHAR columns is set to AL16UTF16. (UTF-16)

Any character not in the NLS_CHARACTERSET seems to be replaced with a inverted question mark.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:13:26+00:00Added an answer on May 23, 2026 at 10:13 am

    Edit: Note that the best way to handle UTF on Oracle is to create the database using the database character set AL32UTF8, and use ordinary varchar2 columns. One of the problems with using nchar columns is that oracle can’t use indexes for ordinary char/varchar2 columns when arguments are sent as nchar by default.

    Anyway: If you can’t convert the database:


    First, unicode literals needs to be prefixed with an ‘n’, like this:

    select n'Language - Språk - Język' from dual;
    

    *) 8-bit encodings can’t handle this text

    Unfortunately, that is not enough.

    For some reason, the default behaviour for database clients is to translate all string literals to the database character set,
    meaning that values will be changed even before the database gets to see the string.

    The clients need some configuration in order to be able to insert a unicode character into an NCHAR or NVARCHAR column:

    SQL Plus on Unix

    These environemnet variables sets up the unix environment and sqlplus to use UTF-8 files,
    and also configure sqlplus to send string literals in unicode.

    NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    LC_CTYPE="en_US.UTF-8"
    ORA_NCHAR_LITERAL_REPLACE=true
    

    (en_US.UTF-8 is for Solaris – Linux or other systems may need different strings, use locale -a to list supported locales.)

    JDBC Driver

    Applications using Oracles JDBC driver needs to have the following system property defined to send strings literals in unicode.

    -Doracle.jdbc.defaultNChar=true 
    -Doracle.jdbc.convertNcharLiterals=true
    

    SQL Developer

    Locate sqldeveloper.conf, and add the following lines:

    AddVMOption -Doracle.jdbc.defaultNChar=true 
    AddVMOption -Doracle.jdbc.convertNcharLiterals=true
    

    SQL Plus on Microsoft Windows

    I haven’t tried if SQLplus on Microsoft Windows or Toad handles utf-8 at all.
    Sqlplusw.exe may do that, and the following registry settings may do the trick.

    NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    ORA_NCHAR_LITERAL_REPLACE=true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading and inserting data into an Oracle database. When I encounter special
I am inserting a group of strings into my table. This is a sample
Are there any implications to using default values, such as empty strings, when inserting
When inserting a row in mysql database, string values need to be enclosed in
After inserting new html to DOM,I need to add some listeners to it. But
I am inserting values in to Database from a Webform using ADO.NET, C#. DB
Basically, I have an NSTableView with 1 collumn, and I'm inserting long strings into
I need to insert many sql rows into oracle database very fast. IndexData is
Is there some way to get a value from the last inserted row? I
(Database: Oracle 10G R2) It takes 1 minute to insert 100,000 records into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.