Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Russian charecters are not displayed correctly in sqlci with UTF8 encoding?

bglazyrNov 22 2021

Hello! I am trying to use sqlcl, but get problems with Russian symbols.
Our database use UTF8 charset and we store not only English and Russian chars, but some European languages too. So on windows 10 computer I set UTF8 codepage in command window.
So, our first problem - sqlcl doesn't show Russian chars in select results.
Here is simplified testcase:
---
D:\...\tests>chcp 65001
Active code page: 65001
D:\...\tests>echo 'Hello World! Привет мир!'
'Hello World! Привет мир!'
---
So, as you can see, command window correctly display russian chars.
---
D:\...\tests>sql t1/***@****:1521:***
SQLcl: Release 21.3 Production on 22 16:05:52 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select 'Hello world! Привет мир!' from dual;
'HELLOWORLD!!'
___________________________
Hello world! !
----
As you can see, All Russian chars are lost.
I tried to change encoding in sqlcl, but same result:
---
SQL> show encoding
encoding "windows-1251"
SQL> set encoding UTF8
SQL> show encoding
encoding "UTF8"
SQL> select 'Hello world! Привет мир!' from dual;
'HELLOWORLD!!'
___________________________
Hello world! !
====
If I execute sql script (with UTF8 encoding) with inserts, that have Russian chars - then they are correctly inserted in DB. I rechecked it from SQLDeveloper.
If I change chcp to 1251 and set encoding to windows-1251, then I see Russian chars correctly.
But thats is not an option for me, because we work with European languages too.
Any ideas?
Best regards,
Boris

Comments
Post Details
Added on Nov 22 2021
4 comments
2,427 views