Skip to Main Content

Oracle Developer Tools for Visual Studio

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!

How to set up ODT for VS to correctly use non-ASCII symbols?

RSa-DevJun 3 2019 — edited Jun 11 2019

Hi all.

There is an issue with non-ASCII (cyrillic) symbols in ODT for Visual Studio.

I've typed the following in the source file of Oracle function created with ODT for VS2015:

select regexp_substr (l_matt_txt, 'Совпадение по : .+\s') into l_match_by from dual;

But after saving to Oracle DB from inside of Visual Studio (Solution Explorer -> Run on source item name) I have in the database:

select regexp_substr (l_matt_txt, '?????????? ?? : .+\s') into l_match_by from dual;

The same behavior I observe while trying to place comments with cyrillic symbols into PL/SQL code.

Which settings should I check or change to keep correct symbols after saving created source items to DB?

I beleieve it is on ODT/VS side because my alternative tool for PL/SQL saves such strings correctly to the same DB.

Please help.

Update:

It is OK with translation non-Ascii symbols to DB if source files are stored in UTF-8.

But Visual Studio by default saves them in Windows encoding (in my case it is 'win-1251').

There is a flag Save documents as Unicode when data cannot be saved in codepage
in Visual Studio menu Tools > Options > Environment > Documents.

It really works for C# projects - but it seems that ODT/VS ignores this setting while saving source files in Oracle (.oradbproj) projects.

Update2:

As a workaround - until ODT will respect the above mentioned flag in VS options (I hope it will):

We can manually save specific source files with non-ASCII symbols via  File > Save As > Save with Encoding...

Then choose 'Unicode (UTF-8 without signature)'.

Fortunately, VS editor keeps choosen encoding for future versions of such files.

Comments
Post Details
Added on Jun 3 2019
0 comments
387 views