€ Stored As ? In Database

Posted by Nithila Pillai on 16-Feb-2017 11:04

Hi Everyone,

OE 10.2B - when I enter €(euro) symbol in text field, it stored as ? in database. By looking into KB it something to do with codepage. But I have no idea to check current code page and convert into right one. Could you pls suggest on this?

Thanks.

Posted by Peter Judge on 16-Feb-2017 11:06

You can inspect the current codepage using the SESSION:CPINTERNAL attribute. You can do conversions with CODEPAGE-CONVERT (although you should probably look at the -cpinternal startup param).
 

Posted by gdb390 on 16-Feb-2017 11:08

the session object handle gives you information on codepages : cpinternal, cpstream , ...

if you have not put a codepage in your startup bat file , you use the default of the installation which you can find in the startup.pf under your installation dir

what OS are you using ?

the ISO codepages are for unix

1252 is a windows codepage  

Posted by Garry Hall on 16-Feb-2017 12:04

I am assuming you see the question mark '?' as a string, and not the unknown value.When you convert from UTF-8 to any non-Unicode codepage, if a character does not exist in that codepage, OE uses '?' as a replacement character. You need to check your -cpinternal/-cpstream of your client AVM (as explained by others), and the database codepage. The database codepage can be found in _Db._Db-xl-name. If you can provide these codepages, that will help explain why your Euro is converted to '?'.

All Replies

Posted by Peter Judge on 16-Feb-2017 11:06

You can inspect the current codepage using the SESSION:CPINTERNAL attribute. You can do conversions with CODEPAGE-CONVERT (although you should probably look at the -cpinternal startup param).

Posted by gdb390 on 16-Feb-2017 11:08

the session object handle gives you information on codepages : cpinternal, cpstream , ...

if you have not put a codepage in your startup bat file , you use the default of the installation which you can find in the startup.pf under your installation dir

what OS are you using ?

the ISO codepages are for unix

1252 is a windows codepage  

Posted by Garry Hall on 16-Feb-2017 12:04

I am assuming you see the question mark '?' as a string, and not the unknown value.When you convert from UTF-8 to any non-Unicode codepage, if a character does not exist in that codepage, OE uses '?' as a replacement character. You need to check your -cpinternal/-cpstream of your client AVM (as explained by others), and the database codepage. The database codepage can be found in _Db._Db-xl-name. If you can provide these codepages, that will help explain why your Euro is converted to '?'.

Posted by Torben on 20-Feb-2017 03:02

In older version (I think 9) you could save and retrieve any one byte character to from one byte database. (We used this to save a mix of data from multiple code pages: 1250, 1251, 1252, 1253 and 1256 in a iso8859-1 database).

This approach don't work with current OpenEdge releases. Here you need to find a code page for database that contains all code pages from all connected clients. (utf-8 in our case)

If clients should be able to read data from all the other clients, then the client code page also need to be utf-8.

And for data to display correctly you need to use utf-8 enabled fonts!

Posted by Torben on 20-Feb-2017 03:07

And source code can also only be in a single code page.

So if you need to save text for multiple code pages in source code, then you source code code page also needs to be utf-8

This thread is closed