|
|
sybperl-l Archive
Up Prev Next
From: Antonio Vasconcelos <vasco at convex dot pt>
Subject: Re: Selecting charset or language from sybperl
Date: Jan 22 1999 12:01PM
At 13:44 21/01/99 -0800, Michael Peppler wrote:
>I suspect that IIS and SQL Server is converting the iso8859-1
>characters to some MS encoding of some sort. I did a quick run to
>check all the character values/mappings here and the mapping that ç is
>turned into on your second example doesn't exist (Solaris 7, Sparc,
>Netscape 4.5).
Yes, that's my opinion now.
I did an additional test. Using Micro$oft Query with an ODBC datasource to
the SQL server I only got the correct chars if I set the option "Convert
OEM to ANSI characters".
So a good gess is that the chars are stored in some win or ms-dos codepage
(maybe cp850 or cp437) and I must make sybperl do the conversion to
iso-8859-1. Is there any way to make sybperl do this automagiclly ?
Well, it won't be difficult to do it by hand anyway, I just have to make a
conversion table between the two sets. Thanks God both are 8 bits.
>What is the default character set for MS-SQL server? Do you have any
>localization installed? This *may* also be a communication problem
>between MS-SQL server and Sybase's OpenClient.
No localization. The server language is English (United States), the
"default language" parameter is zero.
>Antonio> b) The data is IN iso8859-1 but sybperl are doing charset
>Antonio> conversion to something different.
>
>Probably not, unless you've set the locale to something specific on
>the linux box.
Nope, I never touched the stuff... 8-)
The only cfg I did in that field was the keyboard mapping.
>I suspect that I need to add some form of cs_locale() support to
>Sybase::CTlib to allow the user to define the character set that he is
>using (Sybase::DBlib supports this via DBSETLCHARSET()).
Yup, but I whouldn't use DBlib even if I could.
>You can do some more research on this by selecting only the ç in
>'intervençao' (using substring() for example) and using ascii() on it
>to see what it is stored as. Run this both using an MS client (don't
>know if they have a command line tool à la isql) and using either isql
>or sybperl (or both) from the linux client.
>
>This should enable you to find out who is doing the conversion...
I'm sure the conversion is being done by the ODBC driver. I just have to
find what's the native codepage.
Ok, thanks for your help, I'll sumarize latter.
--
António Vasconcelos - Senior Network Management Support
CONVEX - Informática e Sistemas de Comunicações Portugal, Lda
T: +351-1-422-1040 F: +351-1-421-3787 W: http://www.convex.pt
|