1. Chung Hing Charlie Wong
  2. PowerServer Web
  3. Monday, 01 April 2019

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
Zhao Kai Accepted Answer Pending Moderation
0
Votes
Undo

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
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. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019
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. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019
SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER LIKE '%CHARACTERSET';



NLS_CHARACTERSET / AL32UTF8

NLS_NCHAR_CHARACTERSET / AL16UTF16
  1. Chung Hing Charlie Wong
  2. Tuesday, 2 April 2019
There are no comments made yet.
  1. Tuesday, 2 April 2019
  2. PowerServer Web
  3. # Permalink
Chung Hing Charlie Wong Accepted Answer Pending Moderation
0
Votes
Undo

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
Glad to hear that!
  1. Zhao Kai
  2. Wednesday, 3 April 2019
There are no comments made yet.
  1. Tuesday, 2 April 2019
  2. PowerServer Web
  3. # 1
  • Page :
  • 1


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