Hi,
When I was child it was installed in my mind that II_CHARSET on the client had to match that on the server as well.
Is this still the case?
Or has that relaxed over the years?
Is it only really an issue now if you mix single & multibyte character sets?
I sense a gap in my knowledge.
Cheers
Adrian
Hi Adrian,
you did not specify what kind of “server” you mean – DBMS Server (Ingres / ActianX) or OpenROAD Server?
Assuming you mean the DBMS Server the answer is: It depends.
With mixed single-byte charset environments usually an automatic conversion/transliteration is done for varchar types – but you may have problems with characters that are only supported by one character set.
E.g. if your client’s II_CHARSET is WIN1252 and the server has ISO88591 then the € (Euro symbol) will be converted to something else in the server, as ISO88591 does not contain the € character.
This is ok as long as all clients use WIN1252, as in this case the during reading the symbol will be converted back to the €.
But if you use a client with a different charset, e.g. sql/isql on the server (which has ISO88591) the symbol will be shown as a different character.
If you use UTF8 as a server charset, it can represent all characters – but if you have different clients, you may run into similar problems with charaters not supported by the individual client charset.
If you use UTF8 as a client charset, it can represent all characters stored in the server, but not all client characters (for example entered in EntryFields) can be stored in the server.
In addition, you cannot develop OpenROAD applications (using the Workbench) within a mixed UTF8/non-UTF8 charset environment.
At runtime you might set the environment variable II_W4GL_ALLOW_MIX_UTF8=TRUE to allow such a connection, but you have to be aware of the possible problems.
HTH.
Regards,
Bodo
Bodo Bergmann Actian, A Division of HCLSoftware |
GESELLSCHAFTSANGABEN: Actian Germany GmbH | Sitz der Gesellschaft: Halenreie 42, 22359 Hamburg | Geschäftsführung: Stephen Padgett, Marc Monahan | Handelsregister:
Amtsgericht Hamburg | HRB 135991 | USt-IdNr: DE252449897
--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
openroad-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/openroad-users/000c01d9b3da%240fdcc7b0%242f965710%24%40rationalcommerce.com.
Hi Bodo,
Thanks for that - yes Ingres server, OpenROAD was W4GL when I was a child i.e. Still at university.
I sense that this subject might take a full presentation to sort out, but if I can just query one aspect:
I have an OpenROAD runtime client with ISO88591 set and an Ingres DBMS set to the same.
I can input a Euro symbol in the OpenROAD application and save it, then display it again without issue.
Even though ISO88591 has no euro symbol.
At the DOS prompt with a code page default of 850 I see ‘\200’ shown for the Euro aka decimal 128 when looking at the same data as the OpenROAD client on the same machine.
If I change to ISO885915 (stop/start client Ingres NET as required) which has a euro symbol, SQL still shows ‘\200’.
I tried code page 1252 and 28605 (For ISO885915) but still no Euro symbol shown on an SQL select at the dos prompt.
Am I being daft or is there something subtle at play?
I guess it could be both.
Cheers
Adrian
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/SJ0PR06MB78051E1EB2A8AD79FEFE66239331A%40SJ0PR06MB7805.namprd06.prod.outlook.com.
Hi Adrian,
now another factor comes into play:
Your OpenROAD application allows you to enter a Euro symbol because your active Windows ANSI code page (ACP) is probably WIN-1252 (Western), which contains it.
But your II_CHARSET does not match it!
So, you enter the €, which is code point 128 (hex 0x80, octal \200 ) in WIN-1252 (see https://en.wikipedia.org/wiki/Windows-1252).
Your II_CHARSET settings say it is both ISO88591 on both client and server – so no conversion is done between client and server – thus the character is written as code point 128 into the database.
When you then retrieve it, you get code point 128 back (because no conversion between client and server is done due to same II_CHARSET), and it’s displayed as Euro symbol in OpenROAD, because it’s using it as a WIN-1252 code point.
Your “sql” in a command window just prints the code point in octal representation because it is a non-printable character in ISO88591 (see
https://en.wikipedia.org/wiki/ISO/IEC_8859-1).
BTW, It is using displaying it with the OEM code page (rather than the ANSI code page) – which is 850 (check with CHCP command), which does not match your II_CHARSET as well.
When on Windows (Western) we recommend to either use II_CHARSETxx=WIN1252 (OEM code page: 1252), or II_CHARSETxx=UTF8 (OEM code page: 65001) – and not only on the client but also on
the server (setup a new DBMS).
For your different tries of code page changes on the client DOS window: That wouldn’t help as
It’s a “rubbish in – rubbish out” situation.
Bodo.
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/002101d9b3ec%2427c95520%24775bff60%24%40rationalcommerce.com.
Bodo, Chris,
This is excellent content for a KB document. I wonder is it possible for a client side OpenROAD application to query the DB to check the character set then change settings or make a new compatible connection.
Paul
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/cf0ebcf8-36c8-45e3-a4eb-3eecd83df7dfn%40googlegroups.com.
-- Paul White<br> Shift Seven Solutions<br> <b>m: 0414681799</b><br> p: 0754482137<br> e: paul....@shift7solutions.com.au<br> w: https://www.shift7solutions.com.au<br> International: +61414681799<br>
Hi all,
Yes I thought this might run deep.
I had looked at the Windows ANSI code page lists before and looked at all those variations of English and thought – how do they map to a numbered code page?
I poked the web with a stick a few times and gave up.
I did just try setting II_CHARSETxx to WIN1252 on the client and used the OpenROAD command prompt which has chcp = 1252 by default as you state.
The server is on ISO885915.
I selected my test data from the openroad command prompt using the sql command prompt.
My thoughts here are that somewhere in the physical database files on the server is a binary section for my texts with \200 aka 0x80.
My three [varchar] rows now come back with ‘Œ’ symbol instead. (\214 aka 0x8C)
I updated one of the rows from the sql prompt with a Euro symbol and selected again.
The updated row now shows ‘€’ symbol (\200 aka 0x80) .
I binary copied this out and opened it in a binary viewer to confirm.
So for my wee brain, something is now translating the original rubbish \200 aka 0x80 to be \214 aka 0x8c in this new setup.
Can you spoon feed me what happened there?
Cheers
Adrian
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/25270b6e-1ece-b367-6bae-942f89994bf3%40gmail.com.