Currency Code Display

Started by gshauffenburg, July 26, 2024, 03:28:27 PM

Previous topic - Next topic

gshauffenburg

I am trying to display various currency codes in PVX.  The HTML characters for the code are being stored in a variable.

The following works for several, but not all codes:
- ? EVS("$"+HTA(CVS(htmlcode$,"HTML:ASCII"))+"$")

For instance setting HTMLCODE$="¥" (Yen) will work, but setting HTMLCODE$="₯" (Drachma) will not work.

I am looking for any suggestions on how to improve my logic, or to obtain an understanding as to why not all HTML codes can be converted.  We require the HTML code for display on the WEB, but my understanding, and experience is that I cannot display HTML in PVX or Nomads.

Thank you in advance for taking time to review this thread.

Devon Austen

Your logic converts the HTML code to ASCII encoding.

The Yen symbol is part of the ASCII encoding. This means there is a conversion for us to do.

The Drachma symbol is not part of the ASCII encoding. This means there is no valid conversion to ASCII and the ? symbol is used.

If you want to use symbols like Drachma you need to use UTF-8. If you do not have UTF-8 mode enabled you will need to first enable it via SET_PARAM 'U8' then you can convert to UTF8 instead of ASCII.

CVS(htmlcode$,"HTML:UTF8")

Alternatively if you just want to display HTML you could always use a embedded browser in your panel to load a HTML file. You can add a COM control to a panel and then select Chromium Browser for the COM control.
Principal Software Engineer for PVX Plus Technologies LTD.

gshauffenburg

Devon,

Thank you for the information.

I will try your suggestions and if I require anything further I will add an update here.