[freetds] Character conversion issues

Chuck Bearden cfbearden at gmail.com
Thu Oct 28 23:12:59 EDT 2004


On Thu, 28 Oct 2004 22:36:23 -0400, James K. Lowden
<jklowden at schemamania.org> wrote:
> Chuck Bearden <cfbearden at gmail.com> wrote:
<snippage /> 
> Your TDSDUMP log will indicate what the server's default single-byte
> encoding is.  I bet you're trying to insert these names into a
> char/varchar column, and that the server's encoding can't handle it.
> Either that, or you found a bug.
> 
> First test is to use nchar/nvarchar for your column definition.  That will
> take care of the server end.

In a couple of columns I do use varchar because the data going into
them I know to be strictly ASCII alphanumeric, since I am the source
of that data.   All columns actually containing name elements
(LastName, FirstName, etc.) are nvarchar.

> If that doesn't work, or if the single-byte encoding should work, then
> we'll need a TDSDUMP log.  There's still enough detail in the log left
> over from when we were struggling with iconv that we should be able to see
> what the matter is.
> 
> > I can provide a TDSDUMP log of this if it would be helpful.
> 
> You guessed it.  ;-)

Here it is:

  <http://acad24.sahs.uth.tmc.edu/tdslog/tdsdump.log.txt>

> > If I change the client charset to UCS-2LE, I cannot even connect to MS
> > SQL:
> 
> Sad but true.  There's not a big push to handle UCS-2 clients.

My only interest in UCS-2 was due to the hope that, if the server
likes UCS-2, I could bypass conversion issues by feeding it UCS-2.  If
I can make the loading work with UTF-8 I'll be perfectly happy.

Thanks,
Chuck



More information about the FreeTDS mailing list