user2967948
user2967948

Reputation: 549

Insert Special characters 'Mongolian tögrög' and symbol '₮' in Oracle Database

I need to insert currency Mongolian tögrög and symbol to Oracle Database. The insert query as :

INSERT INTO CURRENCY (CUR_ISO_ID, CUR_ISO_CODE, CUR_DESC, CUR_DECIMAL_PLACE, CUR_SYMBOL) 
              VALUES (496,'MNT','Mongolian tögrög',2,'₮');

results as:

 CUR_ISO_ID | CUR | CUR_DESC         | CUR_DECIMAL_PLACE | CUR_SYMBOL |
-----------------------------------------------------------------------
 496        | MNT | Mongolian t?gr?g | 2                 | .          |

Kindly advise on how to get the special characters inserted as is to the Database? i.e. the symbol not as . but and the description not as Mongolian t?gr?g but Mongolian tögrög. Please help.

Upvotes: 1

Views: 309

Answers (1)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59557

Before you launch your SQL*Plus enter these commands:

chcp 65001
set NLS_LANG=.AL32UTF8
  • The first command sets codepage of cmd.exe to UTF-8.
  • The second command tells your database: "I am using UTF-8"

Then you sql should work. I don't think there is any 8-bit Windows codepage 125x which supports Mongolian tögrög.

See also this post to get some more information: NLS_LANG and others

Check also this discussion how to use sqlplus with utf8 on windows command line, there is an issue when you use UTF-8 at command line.

Upvotes: 1

Related Questions