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: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems executing a query
  • Date: Fri, 17 Jun 2005 07:51:42 -0400

Riccardo Penco wrote:
> If in a php script I write:
>
> $sql = "SELECT Città from PDV";
> $res = mssql_query($sql, $conn);
>
> I obtain the following error message:
> Warning: mssql_query(): Error converting client characters into server's
>
> character set. Some character(s) could not be converted. (severity 16)

Does the query work in tsql? It should.

SQL Server 2000 encodes database object names in UCS-2, which obviously
can represent 'Città'. The error message may be telling you that the à is
arriving not as UTF-8 (2 bytes) but as ISO 8859-1 (1 byte, high bit on).
Attempting to interpret ISO 8859-1 as UTF-8 will elicit that message.

A TDSDUMP log will provide more detailed information about the failed
conversion.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page