Skip to Content.
Sympa Menu

freetds - Re: [freetds] FW: Character sets?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Paquin <brian.paquin AT yale.edu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FW: Character sets?
  • Date: Tue, 22 May 2007 14:20:12 -0400

util.c:288:Starting log file for FreeTDS 0.64
on 2007-05-22 12:32:40 with debug flags 0x4fff.
iconv.c:195:names for ISO-8859-1: ISO-8859-1
iconv.c:195:names for UTF-8: UTF-8
iconv.c:195:names for UCS-2LE: UCS-2LE
iconv.c:195:names for UCS-2BE: UCS-2BE
iconv.c:361:iconv to convert client-side data to the "US-ASCII" character set
iconv.c:514:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE"
net.c:168:Connecting to 10.48.106.40 port 2025.
net.c:673:Sending packet
(server name and user/pass omitted)
050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 06 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 02 00 06 04-08 01 00 00 00 00 00 00 |........ ........|
0090 00 00 00 00 54 53 51 4c-00 00 00 00 00 00 00 00 |....TSQL ........|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 04 50 52 4f 44 00-00 00 00 00 00 00 00 00 |...PROD. ........|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 04 00 06 72 65 70 6f-72 74 00 00 00 00 00 00 |....repo rt......|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 08 05 00 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
01e0 0a 05 00 00 00 00 0c 10-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|

net.c:673:Sending packet
0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
0020 36 34 36 00 00 00 00 00-00 00 00 00 00 00 00 00 |646..... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 06 01 35 31 32 |........ .....512|

But I don't get these character set errors using FreeTDS 0.63 on
another server (which, unlike the server above, has Sybase installed).
Here's part of that log:

2007-05-22 12:45:06 Connecting addr 10.48.106.40 port 2025
Sending packet @ 2007-05-22 12:45:06
(server name and user/pass omitted)
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0060 00 00 00 00 06 33 37 38 37 36 00 00 00 00 00 00 |.....3787 6......|
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0080 00 00 00 05 02 00 06 04 08 01 00 00 00 00 00 00 |......... .......|
0090 00 00 00 00 54 53 51 4c 00 00 00 00 00 00 00 00 |....TSQL. .......|
00a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
00b0 00 00 04 50 52 4f 44 00 00 00 00 00 00 00 00 00 |...PROD.. .......|
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
00d0 00 04 00 06 72 65 70 6f 72 74 00 00 00 00 00 00 |....repor t......|
00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
00f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
01a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
01b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
01c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |......... .......|
01d0 00 08 05 00 00 00 54 44 53 2d 4c 69 62 72 61 72 |......TDS - Librar|
01e0 0a 05 00 00 00 00 0c 10 75 73 5f 65 6e 67 6c 69 |........u s_engli|
01f0 73 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | sh....... .......|


Sending packet @ 2007-05-22 12:45:06
0000 02 01 00 5d 00 00 00 00 00 00 00 00 00 00 0a 00 |...]..... .......|
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 69 73 6f |......... ....iso|
0020 5f 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | _1....... .......|
0030 00 00 00 00 00 00 00 00 00 00 00 05 01 35 31 32 |......... ....512|
0040 00 00 00 03 00 00 00 00 e2 00 12 01 07 03 6d 7f |......... .....m.|
0050 ff ff ff fe 02 07 00 00 0a 68 00 00 00 |......... h...|

Do I need to install iconv? (Using a Mac 10.4.x)

Thanks again,

Brian :)

On May 22, 2007, at 1:15 PM, James K. Lowden wrote:

Brian Paquin wrote:

Thanks for replying to the message, but I am afraid tsql is
still using iso646...

tsql is simply reporting your environment, cf. locale(1). Nothing you do
in freetds.conf (or locales.conf) affects your locale settings, so the
tsql output won't change.

A locales.conf file (default) is present in /usr/local/etc/.
Modifying freetds.conf to add:
client charset = ISO-8859-1 or
client charset = ISO_1
have not made a difference.

locales.conf is more or less a failed experiment. You want to set the
client charset in freetds.conf. Check the UG for syntax.

Enabling logging in freetds.conf, I can see that FreeTDS is
sending requests for iso646...

Right. If the above instructions don't help, please post the first 10 or
so lines of the TDSDUMP log.

HTH.

--jkl



On May 21, 2007, at 10:07 PM, James K. Lowden wrote:

From: Brian Paquin
Sent: Friday, May 18, 2007 2:59 PM

I have installed FreeTDS 0.64 (/usr/local/) on a Mac 10.4.8 Server
box,
and configured freetds.conf (/usr/local/etc/) to add entries for our
Sybase 12.5 servers (using TDS protocol 5.0).

When using tsql to establish a connection, I see:
-------
intranet:/usr/local/bin user$ ./tsql -SPROD -Ujohn -Psmith
locale is "C"
locale charset is "US-ASCII"
Msg 2409, Level 11, State 2, Server rs6000_prd, Line 0
Cannot find the requested character set in Syscharsets: name =
'iso646'.

Msg 2411, Level 10, State 1, Server rs6000_prd, Line 0
No conversions will be done.

1>
---------
The database admin says the server uses "iso_1" (same as in
locales.conf)

I believe that because your locale is defined as "US-ASCII",
FreeTDS is
requesting the Sybase server deliver its data as ASCII. iso646 is
Sybase's name for ASCII, but apparently it's not installed on your
system.
Which isn't too surprising; iso_1 is a fine ASCII superset.

You could set up your locale or simply put "client charset =
ISO-8859-1"
in freetds.conf. That should clear up the warning. You can check
the top
of the TDSDUMP log to make sure.

I can query the database at this point, but I can't connect to the
database via PHP... and I'm concerned the character sets are the
reason.

I doubt the charset issue would interfere with data delivery. You
just
get straight-though, unconverted character data, which is just fine
for
English.

HTH.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


_________________________________________
Brian T. Paquin, ACSA, ACHDS, ACTC, ACDT, ACPT
Yale University
Department of Pathology
brian.paquin AT yale.edu
(203) 785-3691


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


_________________________________________
Brian T. Paquin, ACSA, ACHDS, ACTC, ACDT, ACPT
Yale University
Department of Pathology
brian.paquin AT yale.edu
(203) 785-3691






Archive powered by MHonArc 2.6.24.

Top of Page