1. Chung Hing Charlie Wong
  2. PowerServer 2020 or older (Obsolete)
  3. Monday, 1 April 2019 09:05 AM UTC

Sorry for my newbie question, I suppose as I could not find similar questions about encoding.

 

My case is,

1. Chinese character can be retrieved and updated to/from database with correct encoding in PB app,

2. Chinese character can be retrieved through Web app correctly

3. Chinese character become incorrect encoded when it was updated through Web app

-   Test was done by updating fields through data window

 

My environment is,

1. PowerBuilder 10.5.2

2. PowerServer Web 2015

3. Oracle Server 12c

4. Oracle Client 11g

 

Please advise for the above finding. Thanks in advance.

Accepted Answer
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 02:48 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

Hi Chung,

Do you using NCharbind parameter in PB to make it work well? What's the database charset?

For Oracle, please note the NLS_LANG on the machine where the Appeon server located at should be the same with the one in the database. You can go to the Register on the server where the Appeon server is installed to check if the NLS_LANG in the directory: HKEY_LOCAL_MACHINE>SOFTWARE>ORICAL (or
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE) is the same with the one in database. If they are different, change it as per the one in database and restart the machine.


The NLS_LANG value is in the format [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]. Please refer to the article below for details.
https://docs.oracle.com/cd/E12102_01/books/AnyInstAdm784/AnyInstAdmPreInstall18.html

You could use the below SQL statement to check the parameter in the database.
SELECT * FROM nls_database_parameter;

Regards,
ZhaoKai

Comment
  1. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019 03:37 AM UTC
Thanks for your reply, and sorry for my careless on the information provided.

For APPEON server, NLS_LANG = AMERICAN.AL32UTF8

For ORACLE DB, we execute below SQL in PB app and Web app,

SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

PB: AL32UTF8 / WEB: AL32UTF8



select userenv('language') from dual;

PB: AMERICAN_AMERICA.AL32UTF8 / WEB: AMERICAN_AMERICA.AL32UTF8



Any checking I should conduct? Please advise.
  1. Helpful
  1. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019 06:33 AM UTC
More information on question "Do you using NCharbind parameter in PB to make it work well?"

I have checked that the table use varchar2 only.



Meanwhile I found Chinese chacter could not be shown correctly through MS-Access, which access DB through ODBC, may this provide us hints on the troubleshooting?
  1. Helpful
  1. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019 07:10 AM UTC
SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER LIKE '%CHARACTERSET';



NLS_CHARACTERSET / AL32UTF8

NLS_NCHAR_CHARACTERSET / AL16UTF16
  1. Helpful
There are no comments made yet.
Chung Hing Charlie Wong Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 10:50 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Thanks for your advice.

After listing the setting, I found charset of "AMERICAN_AMERICA.AL32UTF8" is expected, meanwhile NLS_LANG in registry / windows environment variable are "AMERICAN.AL32UTF8".

After updating NLS_LANG in registry / windows environment variable to "AMERICAN_AMERICA.AL32UTF8", it works.

Comment
  1. Kai Zhao @Appeon
  2. Wednesday, 3 April 2019 00:51 AM UTC
Glad to hear that!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.