Skip to Content.
Sympa Menu

freetds - RE: [freetds] Problems executing a query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Problems executing a query
  • Date: Fri, 17 Jun 2005 15:41:48 +0200

>
> ZIGLIO, Frediano, VF-IT ha scritto:
>
> [...]
>
> >
> > Thanks
> >
> > As I suggested client (PHP in this case) is not using utf8!
> >
> > 14:30:39.828341 tds_put_string converting 51 bytes of "à
> FROM PDV where città like '%cant%' ORDER BY Città"
> > 14:30:39.828372 Error: tds_put_string: Gave up converting
> 51 bytes due to error 84.
> > Troublesome bytes:
> > 0000 e0 20 46 52 4f 4d 20 50-44 56 20 77 68 65 72 65 |.
> FROM P DV where|
> >
> > 0xe0 is 'à' in iso8859-1, windows1252 and similar but not in utf8.
> > FreeTDS correctly give the error.
> > But IMO it should not send partial converted query !!!
> >
> > freddy77
>
> maybe is OT, but how do I configure PHP to use UTF-8 when
> dealing with
> freetds
>

The problem is the editor. From my machine

$ cat test.php
<?php

echo 'Città';

?>

$ hexdump -C < test.php
00000000 3c 3f 70 68 70 20 0a 0a 65 63 68 6f 20 27 43 69 |<?php ..echo 'Ci|
00000010 74 74 c3 a0 27 3b 0a 0a 3f 3e 0a 0a |tt..';..?>..|
0000001c
$

Note that 'à' is encoded as 0xc3 0xa0, not 0xe0.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page