[freetds] PHP MSSQL throught freetds failing inserts when there any word with a acent

James K. Lowden jklowden at schemamania.org
Sat Mar 15 20:21:26 EST 2003


On Sat, 15 Mar 2003 13:01:51 -0800 (PST), Aliet Santiesteban Sifontes
<alietss at yahoo.com> wrote:
> Hi all the freetds people, I'm testing a lot the new
> MSSQL support in PHP-4.3.1 freetds-0.61, on a RedHat
> 8.0 box, and I must say that everything is pretty
> well, but I'm having a problem when I'm doing a insert
> using as values any word with a acent, example 'Jos_'
> , acents are used in sapanish language a lot, when I
> make the insert I get this error...
> 0: Unclosed quotation mark before the character string ')'.

Aliet, 

Glad things are going "pretty well".  :-)

To handle non-ASCII characters (>128), two things have to be in place:
your local character set has to be specified in freetds.conf, and FreeTDS
has to be compiled with the iconv library.  The error you're getting
indicates to me that FreeTDS isn't converting properly, probably because
of the client character set.  

Try your query with tsql, and have a look at the output of the TDSDUMP log
file.  The top of the log should show what character set is being used and
whether or not libiconv is happy with it.  

--jkl



More information about the FreeTDS mailing list