Hi,
In the same version of U2.Data.Client (3.1.1), the string data format I retrive from a database is different, by changing the library from .NET to .NET Framework, using the codepage 850.
In this case, in the .NET Framework is correct and with .NET the "special" characters are not shown properly.
I'm portuguese and the problem is in the accent words like á, é ç.
Can anyone help me to resolve this issue?
Best regards,
Jose Baptista
Jose,
Please check the ASCII byte values of those individual characters as held in the database using SEQ() in Basic. Do these match what code page 850 expects? e.g.
130 = lower case e with acute
135 - lower case c with cedilla
160 = lower case a with acute
Also - Are you using SBClient or SB/XA (version please) and is this UniData or UniVerse (version). If UniVerse, then are you using NLS?
If you are using SBClient or SB/XA are the accented character byte values mappng to code page 437 possibly? see: https://www.ascii-codes.com/
Regards
JJ
Hi,
In the same version of U2.Data.Client (3.1.1), the string data format I retrive from a database is different, by changing the library from .NET to .NET Framework, using the codepage 850.
In this case, in the .NET Framework is correct and with .NET the "special" characters are not shown properly.
I'm portuguese and the problem is in the accent words like á, é ç.
Can anyone help me to resolve this issue?
Best regards,
Jose Baptista
Jose,
This reference might be useful =- and the encoding class is part of the UniSession object: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding?view=net-8.00
UniObjects for .NET supports the Encoding class of the .NET Framework class library through its
UniSession class property called UOEncoding.
The Encoding class provides methods to convert arrays and strings of UniCode characters to and from
arrays of bytes encoded for a target page. An application can use the properties of the Encoding class
such as ASCII, Default, Unicode, UTF7, and UTF8.
For example:
UniSession m_us=UniObjects(“xxx”, “yyy”, “localhost”, “demo”, “udcs”);
Encoding en=Encoding.UTF8;
m_us.UOEncoding=en;
If the data is being generated using SBClient or SB/XA and you are not using NLS then it is probably held in the database using code page 437 and may need correcponding conversion back to the code page of the client system (SB+ and SB/XA do this automatically using the client system code page).
Also see Managing-SBClient-OEM-font-compatibility-with-other-client-tools-outside-USA-Canada-Australia
Regards
JJ