Skip to Content.
Sympa Menu

freetds - TDS4.2/TDS7.0/unicode

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Denis Sokolov <despot AT delfi.lv>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: TDS4.2/TDS7.0/unicode
  • Date: Thu, 22 Mar 2001 04:46:21 +0200


Hello all,

Environment: PHP4/FreeTDS snapshot/MS SQL7.0 SP1.
Problem: National characters.
I live in Latvia, so there is some characters which placed above 127
in ASCII and should be translated into appropriate unicode chars if
TDS 7.0 version used.
I wrote very simple patch for function tds7_ascii2unicode which
recodes latvian characters to unicode. Simple tests shows that I can
successfully write latvian characters from .c and .pl progz (and show
inserted records from PHP later), but I cannot do same from PHP. When
I input some text using national characters they shown correct before
I use INSERT and insert passes ok, but when I SELECT inserted record
back- all chars are scrambled. And, in table they scrambled too. When
I use TDS4.2 protocol- all works fine except due to protocol
limitation I can't read/write strings longer than 255 bytes.
Can anyone offer solution or point to code which I should fix?
Also, is there way to tell FreeTDS which translation table I
should use for TDS70: part of russian charactersa are located in
same place where latvian, but they should be translated into
absolutely different unicode chars (when I use different HTTP charset,
for example)?

May be, there is way to disable UNICODE in TDS7.0 (didn't find).

--
Best regards,
Denis mailto:despot AT delfi.lv





  • TDS4.2/TDS7.0/unicode, Denis Sokolov, 03/21/2001

Archive powered by MHonArc 2.6.24.

Top of Page