cancel
Showing results for 
Search instead for 
Did you mean: 

corrupt Chinese characters displayed in Power Builder / interfactive SQL - database ASE 16

ncshome
Discoverer
0 Kudos
398

Hi

The Chinese characters stored under varchar column are displayed correctly in isql (in both unix & windows). But it shows junk characters if we try to view this column using Power Builder & interactive SQL (on windows).
Does anyone know the way to fix it?

The default character set in ASE server is iso_1. ASE version is 16 SP04 PL03.

Powerbuilder version 2019 build 2082

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member188958
Active Contributor

The iso_1 character set doesn't include Chinese characters, so it sounds like this system has been set up to spoof the characer set. The client is taking values encoded in some other character set (UTF8 or some other multi-byte Chinese character set), connecting to ASE claiming to be using iso_1 to avoid character set conversion to insert the encoding.. The process can be reversed by a client that also connects indicating it is using iso_1 to extract the value and then displaying the value interpreted by the original encoding.

Powerbuilder and interactive SQL on Windows are likely using the cp850 character set, so character set conversion is changing the values of some bytes that map to different characters in iso_1 and cp850, resulting in junk characters when the converted values are interpreted as the original multi-byte character set.

To store Chinese characters in an ASE that is using iso_1 as the default character set, you can use a univarchar column instead of varchar. That allows you to store unicode-encoded chinese characters in that column without character set conversion while continuing to store iso_1 data in all other char and varchar columns.

Alternatively (and particularly if you think the future will hold increasing use of multiple language data in more columns in the database), the server should be set up to use UTF8 as the default character set.

0 Kudos

Thanks for your explanation Bret. It is a big database. We want to store Chinese name only in 2 tables. So we don’t want to make default character set to utf8 and will not be able to rebuild the whole database. So, we want to keep default character set to iso_1.

isql displays the Chinese name stored under column varchar correctly but not under column univarchar. We have set the dbparam of Powerbuilder with charset iso_1 but still Powerbuilder is showing corrupted characters (Chinese name from both varchar and univarchar columns). Powerbuilder displays the Chinese name correctly (from varchar column) if we make Windows display language to Chinese by configuring Language locales of Window systems to Chinese from us_english. But We don’t want to change the Window display language to Chinese so are looking for a better fix.