Skip to Content.
Sympa Menu

freetds - Re: jdbc + SQLServer 7 + Exception + DB-Library ??

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Stefanos Karasavvidis <stefos AT multimedia-sa.gr>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: jdbc + SQLServer 7 + Exception + DB-Library ??
  • Date: Mon, 10 Apr 2000 18:06:33 +0000




Stefan Bodewig wrote:
> SK> The freeTDS driver does correctly return the Strings even if
> SK> characters from different code pages are included.

>But this is not really because you are using nchar columns I
>think. Did you try your combination of characters with an ordinary
>varchar column?

>Then maybe you could try to use text instead of ntext -
>CONVERT(text, column). This really should not be the final solution
>but might be the best you can get at the moment.

If I (or anyone) use simple varchar/char/text columns, SQL Server uses 8bit
per
character. All is going to work fine if I use simple latin characters only
(1-127).
But if I'm going to use characters with higher values (german Umlauts, French
characters with accent, greek characters) it depends on the OS/Client Lib how
these
characters are given back.

Java uses 16-bit unicode characters. The client library would not know how to
convert
the 8 bit to 16 bit.

The nchar/nvarchar/ntext data types of sql server do store 16bit characters,
and if
you have a correct working client library then you will also retrieve correct
values.
And this is not true for most jdbc drivers I have tried. The freeTDS driver
works
correct except for this problem I've encountered with the ntext data type.

I understand that in Latin character world (english) there aren't many people
concerned about this. I'm happy that I have this minimal but still uncomplete
functionality from the freeTDS project

Stefanos


--
======================================================================
Stefanos Karasavvidis
Electronics & Computer Engineer
e-mail : stefos AT multimedia-sa.gr

Multimedia Systems Center S.A.
Kissamou 178
73100 Chania - Crete - Hellas
http://www.multimedia-sa.gr

Tel : +30 821 88447
Fax : +30 821 88427






Archive powered by MHonArc 2.6.24.

Top of Page