Skip to Content.
Sympa Menu

freetds - [freetds] MsSql UTF-8

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Donald Sures" <donald_sures AT symantec.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] MsSql UTF-8
  • Date: Tue, 18 Mar 2003 10:18:10 -0700

http://www.freetds.org/userguide/a2698.htm


i've read that .. i've read that applying the Character Set = UTF-8
parameter would allow me to query UTF-8 data from a MSSQL NVarChar column
.. The data is 9 characters of japanese text .. these characters have the
first byte as E3 which makes them 3 byte characters .. somewhere in the
conversion from UCS2 to UTF-8 i'm losing bytes ..

is iconv responsible for converting ucs2 to utf-8?

- Perl: v5.8.0 built for i686-linux
- TDS_VERSION_NO "freetds v0.60"
- Microsoft SQL Server 2000 - 8.00.578 (Intel X86)
- MSSQL Column Type NVCHAR(200)
- MSSQL Column Text : 9 characters
- Perl Length() reports text is 9 characters
- Perl prints first 3 characters of string

- For every 3 Japanese characters in the database, 1 Japanese character is
displayed in perl
Here are the hex codes for each byte of the data string:
テ-E3 83 86
- E3 82 B9
- E3 83 88
- E3 83 86
- E3 82 B9
- E3 83 88
- E3 83 86
- E3 82 B9
- E3 83 88

LOCALES.CONF
==============
[default]
date format = %b %d %Y %I:%M%p
char set = UCS-2

[en_US]
date format = %b %d %Y %I:%M%p
language = us_english
char set = UCS-2


FREETDS.CONF
===============
[xxxx]
host = xxxx
port = 1433
tds version = 7.0
dump file = /tmp/freetds.txt
debug level = 99
client charset = UTF-8






---
DJ Sures
Alert Services
Symantec Corporation
V 1.403.213.3939 Ext. 250
F 1.403.233.9179



  • [freetds] MsSql UTF-8, Donald Sures, 03/18/2003

Archive powered by MHonArc 2.6.24.

Top of Page