Unix Technical Forum

Storing and viewing UTF-8 characters...

This is a discussion on Storing and viewing UTF-8 characters... within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I have a need to pull information from an Oracle 9.2.1 database. It is storing UTF-8 characters in ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:58 PM
CJ Butcher
 
Posts: n/a
Default Storing and viewing UTF-8 characters...

Hi,

I have a need to pull information from an Oracle 9.2.1 database. It is
storing UTF-8 characters in a varchar2(33) field. I need to be able to pull
these values out and put them in a SQL Server 2000 version of the table with
the UTF-8 characters intact.

Anyone know how to do this...efficiently? I've tried DTS and the high end
UTF-8 characters get lost in the copy.

Thanks,

CJ


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:58 PM
Simon Hayes
 
Posts: n/a
Default Re: Storing and viewing UTF-8 characters...


"CJ Butcher" <cj@cjbutcher.com> wrote in message
news:1EcXb.23413$Ns1.11168@newssvr27.news.prodigy. com...
> Hi,
>
> I have a need to pull information from an Oracle 9.2.1 database. It is
> storing UTF-8 characters in a varchar2(33) field. I need to be able to

pull
> these values out and put them in a SQL Server 2000 version of the table

with
> the UTF-8 characters intact.
>
> Anyone know how to do this...efficiently? I've tried DTS and the high end
> UTF-8 characters get lost in the copy.
>
> Thanks,
>
> CJ
>
>


This KB article may be helpful:

http://support.microsoft.com/default...b;en-us;232580

Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 08:00 PM
CJ Butcher
 
Posts: n/a
Default Re: Storing and viewing UTF-8 characters...

Thanks for the attempted help Simon.

I've read the article before and am able to get UTF-8 characters into SQL,
the problem is getting them directly from Oracle, seems that DTS converts
the characters to UCS-2 during the transfer...and I don't want it to.

Thanks,

CJ
"Simon Hayes" <sql@hayes.ch> wrote in message
news:402dfaf9$1_1@news.bluewin.ch...
>
> "CJ Butcher" <cj@cjbutcher.com> wrote in message
> news:1EcXb.23413$Ns1.11168@newssvr27.news.prodigy. com...
> > Hi,
> >
> > I have a need to pull information from an Oracle 9.2.1 database. It is
> > storing UTF-8 characters in a varchar2(33) field. I need to be able to

> pull
> > these values out and put them in a SQL Server 2000 version of the table

> with
> > the UTF-8 characters intact.
> >
> > Anyone know how to do this...efficiently? I've tried DTS and the high

end
> > UTF-8 characters get lost in the copy.
> >
> > Thanks,
> >
> > CJ
> >
> >

>
> This KB article may be helpful:
>
> http://support.microsoft.com/default...b;en-us;232580
>
> Simon
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 08:00 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Storing and viewing UTF-8 characters...

CJ Butcher (cj@cjbutcher.com) writes:
> Thanks for the attempted help Simon.
>
> I've read the article before and am able to get UTF-8 characters into SQL,
> the problem is getting them directly from Oracle, seems that DTS converts
> the characters to UCS-2 during the transfer...and I don't want it to.


Storing Unicode data in SQL Server as UTF-8 is probably not a good idea.
There is no collation that understands UTF-8, so if you could get all
sorts of funny surprises when sorting or comparing UTF-8 data. You could
also get nasty surprises with conversion when retrieving or inserting
data, because the client will think that the data is something else
than what it is.

If you really insist of pushing down the squared peg through the round
hole, your best bet is probably to store the data as binary. Then at
least all bits would be in place, but there would still be a lot to lose.

The way to store Unicode data in SQL Server *is* UTF-16.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 08:02 PM
CJ Butcher
 
Posts: n/a
Default Re: Storing and viewing UTF-8 characters...

I read that many days ago. It was relatively useless.

CJ
"Simon Hayes" <sql@hayes.ch> wrote in message
news:402dfaf9$1_1@news.bluewin.ch...
>
> "CJ Butcher" <cj@cjbutcher.com> wrote in message
> news:1EcXb.23413$Ns1.11168@newssvr27.news.prodigy. com...
> > Hi,
> >
> > I have a need to pull information from an Oracle 9.2.1 database. It is
> > storing UTF-8 characters in a varchar2(33) field. I need to be able to

> pull
> > these values out and put them in a SQL Server 2000 version of the table

> with
> > the UTF-8 characters intact.
> >
> > Anyone know how to do this...efficiently? I've tried DTS and the high

end
> > UTF-8 characters get lost in the copy.
> >
> > Thanks,
> >
> > CJ
> >
> >

>
> This KB article may be helpful:
>
> http://support.microsoft.com/default...b;en-us;232580
>
> Simon
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:07 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com