Question How To Read Unicode U+20ac And Display Its Symbol As Output?

Raj2010

New Member
Hi,

I have 3 question with this,
1. Could any one please let me know how to read unicode U+20AC(Euro Currency Symbol) and display it as output.
2. how to store in db table?
3. Any internal settings we need to do in PF file to display special characters?

Currently i am using open edge 11.3
windows system.

cpstream= ISO8859-1 (in my db table)


Regards,
Raj.
 
Last edited:

Raj2010

New Member
Hi Tamhas,

Can you please let me know how to change this from 8859-1 to 8859-15?

Can't we read without this 8859-15? any alternative method to read Euro symbol into out db table? Please suggest.

Regards,
Raj.
 
Last edited:

RealHeavyDude

Well-Known Member
The two code pages iso8859-1 ( which does not contain the € symbol ) and iso8859-15 are not compatible. Meaning they do not support the same character set which in turn means that Progress won't do an automatic conversion ( like it does between compatible code pages, like ibm850 which is compatible to iso8859-1 ). You can still roll you own but that does not make sense to me at all.

You can either convert your database to iso8859-15 and eventually accept data corruption or to utf-8 and you should have no problem as long as you did not store characters that are not supported by iso8859-1 in your database. If you have, you will have issues. You can use the convchar option of the proutil command. It does offer an option to scan the database for characters that will get corrupted during the conversion and you should therefore fix upfront.

As soon as you have your database converted to utf-8 you can use any codepage on the client you like and Progress will do the back and forth conversion automatically for you.

Heavy Regards, RealHeavyDude.
 

Raj2010

New Member
Hi,

What is the procedure to convert db from 8859-1 to iso8859-15 ?
If it takes more time then what is the way(temporary method) to store Euro symbol in 8859-1( Can we store ASCII code and while displaying can we display its symbol?).

Regards,
Raj.
 

RealHeavyDude

Well-Known Member
Have a look here OpenEdge 11.6 Documentation

How long the conversion takes depends on the size of your database.

There is no good way to handle the € symbol in a database with iso8859-1. Whatever you will do is just fiddling around.

Heavy Regards, RealHeavyDude.
 

Raj2010

New Member
Hi Real Heavy Dude,

Thanks for your suggestion.

I am right now in a different scenario, I have one currency table which has 4 records, 1 - Euro currency , 2 - US dollar, 3, Canadian Dollar, 4 - GBP - pound,
Fields are Currency Code, Currency Description, Currency Symbol.
I am able to show $(dollar), £ (Pound), but i am not able to display € symbol in the output screen.

So I need to store € symbol in a database table any format but output i need to display its symbol after converting / any mean .

1. Read ASCII code of € and display its symbol on output screen.

2. Read Unicode and store it in db table and display its symbol on output screen.

My Critical part of work is either I need to read any one value from the below list and store it in db table(table name - currency) and show € on output screen after converting back.

ASCII Type Code
Decimal 8364
Hexadecimal 20AC
Unicode U+20AC
Symbol

Can you please give a small code or any useful link to perform this operation?

Regards,
Raj.
 

RealHeavyDude

Well-Known Member
You can't display the € symbol when the client uses code page iso8859-1 because it does not support it, and, you can't use iso8859-15 ( which does support it ) against the a database with iso8859-1 as these code pages are not compatible. In my experience, there is no work around, you need to change the code pages. You can't tell the Progress client to display a character that is not supported by the code page it uses.

I don't understand as to why you are not able to change the code page when there is valid business requirement that makes it necessary.

That has nothing to do with Progress, that is basic IT knowledge about character sets and how they are mapped in code pages so that characters can be computed correctly on IT systems. Any character computation in any software is based on that. Whenever you are trying to fiddle around with this, for example if you try to tweak the code pages themselves or a terminal emulation, you are basically compromising character computation on your IT system.

That is probably not what you want to hear from me, but that is the answer I can give you. I had to deal with these issues so many times in the past when people not understanding the implication of code pages on character computation fiddled around and seriously messed up - or even worse silently corrupted - production data in way that they were unable to recover parts of it.

Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
Forgot to add: If you are running with a GUI client ( you don't tell ) - you could also display an image to prevent the code page issue.

Heavy Regards, RealHeavyDude.
 

Raj2010

New Member
Hi Yes I agree with RHD, but my question is that if i move from Openedge 11.3 to 11.6 will it solve my problem automatically??
what current version of progress supports $(dollar),€(euro), ¥(Japanese yen), £(GBP).
I am currently using Openedge 11.3 and Currenty i have tested for $(dollar),¥(Japanese yen), £(GBP) Symbol its working fine except € (euro).

Regards,
Raj
 

RealHeavyDude

Well-Known Member
There seems to be a misunderstanding.

Since you want to support different currency symbols you need to find a code page that supports these. UTF-8 does support these symbols. Whether there are other code pages that support all currency symbols that you require is subject to recherche.
You should have a look here to get an understanding of code pages: Code page - Wikipedia, the free encyclopedia

Your problem has nothing to do with the version of OpenEdge that you currently use or you are planning to migrate to. Your problem is solely a code page issue. Any OpenEdge version there is, there was and there will be for the forseeable future supports at least UTF-8. Therefore upgrading to OpenEdge 11.6 won't solve your issue. You need to use a code page that provides suppport for all characters you need to support in your applcation. There is no other way. Full stop.

That means that you need to convert the code page of the database and start your clients with the corresponding code page regardless which version of OpenEdge you are using.

Furthermore, this has nothing to do with Progress. This is basic character computation in any reasonable software. Any software that does not work with code pages is not software - it is something else.

Heavy Regards, RealHeavyDude.
 

andre42

Member
You could try Windows-1252. The 7F through 9F range in ISO8859-1 is either undefined or contains control characters. In Windows-1252 this range contains printable characters. 80 is the € sign.
This is probably kind of a hack. The other answers would be preferable.

The OpenEdge version shouldn't make a difference, Unicode support was introduced with OE 10 IIRC.
 
Top