Skip to Content.
Sympa Menu

freetds - RE: [freetds] select bug...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Spyros Ioakim" <sioakim AT atlas.ace-hellas.gr>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] select bug...
  • Date: Mon, 12 May 2003 20:36:33 +0300

First of all I see you have realised what the problem is.
It is exactly as you describe.

I looked at my log file and indeed wherever there is a greek character
it is represented by a greek character.
That is the greek letter "Pi" is not converted to english "P".
What I'm saying is that the greek letters are not converted in the log
in any way.

My locale is all english:
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

Let me know if I can help with anything more.

Best Regards,
Spyros

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Lowden, James K
Sent: Monday, May 12, 2003 5:56 PM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] select bug...


> From: Spyros Ioakim [mailto:sioakim AT atlas.ace-hellas.gr]
> Sent: May 11, 2003 4:45 PM
>
> OK found the old post...
> I have compiled freetds with these options:
> ./configure --with-tdsver=7.0 --enable-msdblib --with-unixodbc
> --prefix=/usr/local/freetds/
>
> I recompiled freetds with the nightly build I just downloaded
> but still no luck.

Let me make sure I understand what you're seeing. Using the latest
build,
your query should return two rows, but using FreeTDS you get only one.
We
suspect an encoding problem, because your query includes a LIKE clause
against some literal Greek characters.

The query is complex, but it's apparent that the Greek character
comparison
is part of a large OR condition. Using the latest snapshot, you get
back
CompID 186. Can you tell which criteria that meets, and how it's
different
from the one that was excluded? Is in fact "CntrctType LIKE 'pS%'" the
salient clause? ['pS%' isn't right; that's how my mailer represented
the
Greek letters.]

What's interesting, for some value of "interesting" is this chunk of
your
log file (from the snapshot):

23:59:04.187889 tds_put_string converting 36 bytes of "Ó%' AND ToDate >=
'05/06/03') ) ) )
"
23:59:04.187906 tds_put_string wrote 72 bytes
Sending packet @ 23:59:04.187922
0000 01 01 00 60 00 00 01 00-20 00 4c 00 49 00 4b 00 |...`.... .L.I.K.|
0010 45 00 20 00 27 00 f0 00-d3 00 25 00 27 00 20 00 |E. .'.ð. Ó.%.'. .|
0020 41 00 4e 00 44 00 20 00-54 00 6f 00 44 00 61 00 |A.N.D. . T.o.D.a.|
0030 74 00 65 00 20 00 3e 00-3d 00 20 00 27 00 30 00 |t.e. .>. =. .'.0.|
0040 35 00 2f 00 30 00 36 00-2f 00 30 00 33 00 27 00 |5./.0.6. /.0.3.'.|
0050 29 00 20 00 29 00 20 00-29 00 20 00 29 00 0a 00 |). .). . ). .)...|

What I want to know, Spyro, is this: Are the characters in line 0010
correct? That is, are the Greek characters you're comparing to encoded
as
=00f0 and =00d3 in UCS-2? Because that's what we're asking the server
to
find.

I'm betting those are the wrong values. Why?

1. You got the wrong answer.
2. The log says we're converting from ISO-8859-1.

I'm betting that if you look at the UCS-2 =00f0 character, find its
ISO-8859-1 equivalent, take that binary value, and look it up in the
Greek
charset your client is actually using (whew!) *that* is the character
you
meant to send.

Tell me if we're on the right track, and then we can go on from there.
Also, could I see the output of locale(1) on the system in question?

--jkl
-----------------------------------------
The information contained in this transmission may contain privileged
and confidential information and is intended only for the use of the
person(s) named above. If you are not the intended recipient, or an
employee or agent responsible for delivering this message to the
intended recipient, any review, dissemination, distribution or
duplication of this communication is strictly prohibited. If you are not
the intended recipient, please contact the sender immediately by reply
e-mail and destroy all copies of the original message. Please note that
we do not accept account orders and/or instructions by e-mail, and
therefore will not be responsible for carrying out such orders and/or
instructions.


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





Archive powered by MHonArc 2.6.24.

Top of Page