[freetds] Special character problem with php freetds cron
Lowden, James K
LowdenJK at bernstein.com
Mon Jul 7 15:55:53 EDT 2003
> 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.
More information about the FreeTDS
mailing list