Toad World® Forums

how to set encoding sql editor?

Hi All;

I am really confused about how to write sql code on sql editor. I have some special characters are some of russian,some of turkish some of japon. When i try to paste a sql code including these char, sql editor cannot read them and replacing them with “?”.

ex:
insert into t_retailers values (455,‘RU’,‘Интернет-магазин Sony Style’,sysdate,‘CDBLOAD’,sysdate,‘CDBLOAD’,1);
insert into t_retailers values (456,‘RU’,‘Другое’,sysdate,‘CDBLOAD’,sysdate,‘CDBLOAD’,1);

in this example special chars are replacing with “?” on sql navigator sql editor or toad sql editor ?. Where can i set up the encoding type of these editors ?

Thank You .
My Best Regards

Hi Canersahan,

Unfortunately, we’re currently not supporting multibye in the editors. However, if you’re using 5.5 and above, we do support multibyte in the data grid so instead of running these statements to insert records you can manually enter them into a grid. Please check out the Beta threads if you want to try our beta build. (the current GA is 6.0)

Cheers
Gwen

how can i insert below query without any damage ? When i copy and paste it on sql editor it is corrupting?

insert into t_retailers values (455,‘RU’,‘Интернет-магазин Sony Style’,sysdate,‘CDBLOAD’,sysdate,‘CDBLOAD’,1);
insert into t_retailers values (456,‘RU’,‘Другое’,sysdate,‘CDBLOAD’,sysdate,‘CDBLOAD’,1);

Hi,
Like I stated before, SQL Navigator doesn't support the multi-byte characters in the sql scripts (because of limitations of the third-party database access component we use) that's why the data is corrupting. This feature will be added in the future.

If you want to insert these records, you have to MANUALLY paste in the Russian record into the data grid or the table editor. Because your data is in different languages (Russian, japanese, etc. ) you have to use SQL Nav 6.0 because it supports multiple-languages. Please refer to the snapshots to locate the data grid and table editor in SQL Nav 6.0.

You can also refer to this link for a thorough explanation.
http://sqlnavigator.inside.quest.com/thread.jspa?messageID=23019

Cheers
Gwen

Hi,
Like I stated before, SQL Navigator doesn’t support the multi-byte characters in the sql scripts (because of limitations of the third-party database access component we use) that’s why the data is corrupting. This feature will be added in the future.

If you want to insert these records, you have to MANUALLY paste in the Russian record into the data grid or the table editor. Because your data is in different languages (Russian, japanese, etc. ) you have to use SQL Nav 6.0 because it supports multiple-languages. Please refer to the snapshots to locate the data grid and table editor in SQL Nav 6.0.

You can also refer to this link for a thorough explanation.
http://sqlnavigator.inside.quest.com/thread.jspa?messageID=23019

Cheers
Gwen
datagrid.gif

Thank you for your efford. I have just find one free way for this problem. Oracle sql developer is supporting multibyte and it is free. When i buy sql navigator 6.0 i will try it.

Cheers
Caner

Will the multilang support be in SQLNAV 7?

Yes, SQL Navigator 7.0 will support multilang/Unicode.

In 7.0, user can specify text encoding for script files in Save/Save As dialog.

Ok, looks good, but a widely used encoding is “UTF-8 without BOM” (Not just “UTF-8”).

Will it support “UTF-8 without BOM”?

Because I really need it :slight_smile:

Hi Martins,

I have logged Issue SQLNAV-1204 for you to add the UTF-8 without BOM option. We will let you know once we implement it.

Thanks,

Vincent

Hi Martin,

Encoding option “UTF8 No BOM” has beed added in the save file window in the latest beta, download and have a try please. :slight_smile:

Thanks,

Shirly

Finally! :slight_smile:

It seems that something is “overfeatured” with this new encoding functionality :slight_smile:

Scenario:

I create a simple .txt file:

ScreenShot066.jpeg

Name it and change it to .sql:

ScreenShot067.jpeg

ScreenShot068.jpeg

Edit it with Notepad:

ScreenShot069.jpeg

And I write some special characters that I use all the time in Latvian language:

ScreenShot070.jpeg

Save it and check the files encoding with Notepad++:

ScreenShot071.jpeg

Open the file in SQLNAV new Beta (7.1.0.3535) add some other characters and try to save the file:

ScreenShot072.jpeg

Why? WHY?! :slight_smile: Is it asking about the encoding again? That happens with every single file that we are storing with the ANSI encoding.

The funny thing is - I can ignore the warning and press OK and no characters are lost when I reopen the file.

Thanks for the valuable feedback… We made the decision to warn encoding every time when a file containing non-ascii characters is saved in ANSI encoding. Apparently some users like you would like to save those international characters supported by local system in ANSI. Such ANSI files work without any problems in local system, but no guarantee in other systems that may have different regions and language (locale) settings. I would suggest people to save such files in UTF-8 No BOM.
However, you raised a good point here. SQLNav should not warn for encoding since those files used to work fine in the system, and notepad & notepad++ don’t warn anything either when the contents can be handled in local system. We will change the method to check encoding and only warn it when necessary (such as saving Chinese in the system which sets French as the language for non-Unicode programs).

Thanks,
Vincent