[freetds] Moving from protocol TDS 4.2 to 7.0 -> French char acters problem

Philippe PAULEAU ppauleau at cartesis.com
Fri Apr 4 04:01:10 EST 2003


thanks everyone's help.
more hints:

root /usr/local/freetds/etc #tsql -S jupiter -U forum
locale is
"LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONETARY=
fr_FR;LC_MESSAGES=fr_FR;LC_PAPER=fr_fr;LC_NAME=fr_fr;LC_ADDRESS=fr_fr;LC_TEL
EPHONE=fr_fr;LC_MEASUREMENT=fr_fr;LC_IDENTIFICATION=fr_fr"
charset is "ISO-8859-15"
Password: 
Msg 5703, Level 0, State 1, Server HECTOR, Line 0
Changed language setting to us_english.
1> version
using TDS version 7.0
1> use forumtest
2> go
1> select * from phpbb_posts_text
2> go
post_id bbcode_uid      post_subject    post_text
2       67455fa3cc      test            été
1

TDSDUMP output:
tarting log file with debug level 99.
2003-04-04 10:34:16.775553 iconv will convert client-side data to the
"ISO-8859-15" character set
2003-04-04 10:34:16.788509 Connecting addr 10.1.5.11 port 1433 with TDS
version 7.0
2003-04-04 10:34:16.789132 inside tds_process_login_tokens()

In fact when i read the database, there is no problem, as seen in debug
mode.
This database has been filled using TDS 4.2

The problem occurs, now i am in 7.0, when i make NEW post in my forum
( same if i drop my database and create brand new one )

root /tmp #tsql -S jupiter -U forum
locale is
"LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONETARY=
fr_FR;LC_MESSAGES=fr_FR;LC_PAPER=fr_fr;LC_NAME=fr_fr;LC_ADDRESS=fr_fr;LC_TEL
EPHONE=fr_fr;LC_MEASUREMENT=fr_fr;LC_IDENTIFICATION=fr_fr"
charset is "ISO-8859-15"
Password: 
Msg 5703, Level 0, State 1, Server HECTOR, Line 0
Changed language setting to us_english.
1> use forumtest
2> go
1> select * from phpbb_posts_text
2> go
post_id bbcode_uid      post_subject    post_text
4       2a86375e63      test3           frenchtest 't'


The string in the database is now "frenchtest 't'" but i've posted
"frenchtest été"
The log file with TDSDUMP shows also "frenchtest 't'" when the database is
read.

I don't find my string "frenchtest" in log file when posting ( writing to
database )
confusing no ?

regards.
Philippe PAULEAU



> -----Message d'origine-----
> De : Lowden, James K [mailto:LowdenJK at bernstein.com]
> Envoyé : jeudi 3 avril 2003 16:56
> À : 'FreeTDS Development Group'
> Objet : RE: [freetds] Moving from protocol TDS 4.2 to 7.0 -> 
> French char
> acters problem
> 
> 
> > From: Philippe PAULEAU [mailto:ppauleau at cartesis.com]
> > Sent: April 3, 2003 9:03 AM
> >
> > Using protocol 7.0, the french caracters ( accents, é à ... 
> ) are not
> > handled correctly.
> > I've noticed that 7.0  deals with the special characters in a 
> > different way (due to unicode ... )
> > So i've tried to change client charset to FR ( and other ISO 
> > charsets ) in the config file but nothing works.
> 
> If you place this line in freetds.conf:
> 
> 	client charset = ISO-8859-1
> 
> FreeTDS will convert TDS 7.0 strings (encoded in UCS-2), 
> using libiconv.
> There are few issues to keep in mind:
> 
> 1.  Your locale(1) output should indicate that you're configured for
> ISO-8859-1.  
> 2.  FreeTDS converts n[var]char and ntext datatypes, 
> including metadata.  
> 3.  Ordinary char/varchar data are stored on the server in 
> the server's
> (single-byte) character set, and shipped to the client 
> unaltered.  FreeTDS
> will not attempt to convert char/varchar data.   For that reason, the
> server's character set must match the client's.  
> 
> You can check that FreeTDS is converting correctly with "tsql -C" and
> TDSDUMP.  The top of the log file will indicate if libiconv 
> was initialized
> successfully, and what conversions it will perform.  "tsql 
> -C" will show how
> FreeTDS is configured, including whether or not libiconv was 
> linked in.  
> 
> Please tell us how you fare.  This functionality is being 
> actively worked
> on.  
> 
> > For now i only have 2 options:
> >  - switch back to 4.2 which works.
> 
> Because 4.2 works, it sounds like your server and client 
> character sets are
> in order.  
> 
> >  - forget french and use english only
> 
> George Bush might recommend that, but I don't.  :-)
> 
> --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.
> 
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 


-------------------------------------------------------------------------
CARTESIS - http://www.cartesis.com

The information transmitted is intended only for the person or entity  to
which it is addressed  and  may  contain  confidential  and/o  privileged
material. Any review, retransmission, dissemination or other use  of,  or
taking of any action in reliance upon, this  information  by  persons  or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.



More information about the FreeTDS mailing list