Focal Point
[SOLVED] Does NLS Settings 65001 - Unicode(UTF-8) support extended ascii

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9787098096

November 01, 2018, 11:11 AM
getit
[SOLVED] Does NLS Settings 65001 - Unicode(UTF-8) support extended ascii
When I run this

-REPEAT :Loop FOR &Count FROM 33 TO 255;
-SET &Char = HEXBYT(&Count, 'A1');
-TYPE &Count &Char
-:Loop

all the extended ascii symbols are blank.
MY NLS setting is set to 65001 - Unicode(UTF-8)
and my language en.
Does this setting not support exnteded ascii.l How to get extended ascii working?

This message has been edited. Last edited by: FP Mod Chuck,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 01, 2018, 11:15 AM
Doug
What's your output (HTML, PDF, etc...)?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
November 01, 2018, 11:16 AM
getit
HTML, Just ran that code with nothing else,it would default to a browser.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 01, 2018, 12:36 PM
Tony A
quote:
-REPEAT :Loop FOR &Count FROM 33 TO 255;-SET &Char = HEXBYT(&Count, 'A1');-TYPE &Count &Char-:Loop

Unicode chars extend beyond char 256, so extend your counter.

When you are dealing with Unicode and "non-standard" code pages, you really need to make sure you know more about it.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 01, 2018, 02:02 PM
getit
Thanks Tony, changing it to A8 instead of A1 is showing values for the other higher numbers. I understand when you meant counter , since unicode can extend into thousands not just 255 , I have seen till 60000 or more, but I also had to increase the A1.

This message has been edited. Last edited by: getit,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 01, 2018, 02:17 PM
Tony A
quote:
changing it to A8 instead of A1

Uh, No, the result of HEXBYT is always 'A1'.

What I meant is
-REPEAT :Loop FOR &Count FROM 33 TO nnn;

Where you need to research what "nnn" should be.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 01, 2018, 02:56 PM
getit
Unicode can store using one to four 8 bit-bytes, 1 Byte is only until 128 after that it increases.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 01, 2018, 04:06 PM
Waz
If you just want to add a unicode char to the HTML page, then you can use a decimal numeric character reference.

e.g.
-HTMLFORM BEGIN
<table>
<tr><th>Decimal</th><th>Escape Char</th><th>Unicode Char</th></tr>
-REPEAT :Loop FOR &Count FROM 8352 TO 8373;
<tr><td>&Count</td><td><span>&</span>#&Count;</td><td>&|#&Count;</td></tr>
-:Loop
</table>
-HTMLFORM END



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 02, 2018, 04:29 AM
Tony A
quote:
Unicode can store using one to four 8 bit-bytes, 1 Byte is only until 128 after that it increases.

So my ploy to encourage you to prove me wrong worked Smiler

We can always give the answers to people but they do not necessarily learn. Encouraging them to do some of the research themselves will help them retain some of the knowledge that they gain during that research!

Essentially, "give a person a fish and they'll eat well for a day, ...... etc."


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 04, 2018, 02:55 PM
Waz
quote:
give a person a fish and they'll eat well for a day


Unfortunately, that is not the society we live in any more.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 05, 2018, 11:46 AM
Wep5622
Give a person a fish and they will take it apart to find out what you did to it. People don't trust free fish anymore these days.

And then if you teach a person how to fish, they will inquire why the h*ll you're not doing it instead, since you know so much better how.

Ah, those days when people were still happy to be taught something...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 05, 2018, 02:54 PM
Waz
cynicism = Old FOCUS Programmer


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 06, 2018, 08:50 AM
Tony A
quote:
cynicism = Old FOCUS Programmer

I don't know what you mean Music
November 06, 2018, 10:24 AM
getit
quote:
So my ploy to encourage you to prove me wrong worked


It did, I followed your advice exactly and read on it which helped solved my issue Smiler


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 07, 2018, 02:07 AM
Tony A
Excellent!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10