Skip to Content.
Sympa Menu

freetds - RE: [freetds] Special character problem with php freetds cron

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Special character problem with php freetds cron
  • Date: Mon, 7 Jul 2003 14:55:53 -0400

> From: Oliver Baden [mailto:obaden AT yahoo.de]
> Sent: July 7, 2003 10:23 AM
>
> > When I run this script from console everything works
> > fine. Doing the same by cron job all the german
> > special characters are not read properly from
> > database. The umlaut-characters are retrieved as
> > question-marks.
> >
> > The data being retrieved is stored in ntext fields.
>
> solved it myself. Changed the field-type from ntext to
> text and now it's working! Will see tomorrow what
> side-effects I created by doing so ;-))

Oliver,

Our documentation could be clearer on this point. To use ntext fields, your
client charset has to be defined in freetds.conf (not locales.conf. I
expect the next release of FreeTDS to drop locales.conf; it was never used
as it was intended.) Also, the configure script has to detect your iconv
library.

Later versions of FreeTDS make the character set conversions explicit in the
log. You would have seen that the client charset was not being detected.
The '?' showed up because the umlaut-characters are not convertible to the
default charset, ASCII.

The reason text works better than ntext for you is partly luck: your client
and server share a character set, probably ISO-8859-1 or similar. For
datatypes text, char, and varchar, FreeTDS 0.61.1 performs no conversion;
everything Just Works as long as the client and server use the same
encoding.

The next release of FreeTDS will convert all character data. I hope it will
cope easily with your relatively simple case, with or without libiconv. I
would appreciate any feedback you can offer on more recent snapshots, if you
have the time, because it's important to us that this feature work
correctly.

Regards,
--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.






Archive powered by MHonArc 2.6.24.

Top of Page