dbTalk Databases Forums  

RE: Importing UTF-8 Text Files via DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss RE: Importing UTF-8 Text Files via DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mingqing Cheng [MSFT]
 
Posts: n/a

Default RE: Importing UTF-8 Text Files via DTS - 09-17-2004 , 04:19 AM






Hi Jonathan,

Thanks for your postsing!

From your descriptions, I understood that you would like to UTF-8 text
files via DTS. Correct me if I was wrong. Based on my knowledge, files
could be encoded using UTF-16 or UCS-2, not UTF-8.

The Win32 API, Java, ODBC/OLEDB, etc all use UCS-2/UTF-16 as their
representation of Unicode (UCS-2 encodes Unicode using 16 bits per
character instead of the variable 8-24 bits used by UTF-8). If you want to
do much of anything with that data, including inserting it into SQL Server
or some other RDBMS via DTS. you'll have to convert the flat file from
UTF-8 to UTF-16/UCS-2. There is a Win32 function called
MultiByteToWideChar that can do this pretty trivially. If you don't want
to write your own code to do it, there's some sample code to convert from
UTF-8 to UTF-16 on the Unicode Consortium's web site at
http://www.unicode.org/Public/PROGRAMS/CVTUTF.

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!




Reply With Quote
  #2  
Old   
Mingqing Cheng [MSFT]
 
Posts: n/a

Default RE: Importing UTF-8 Text Files via DTS - 09-21-2004 , 03:06 AM






Hi Jonathan,

I am just checking on your progress regarding the information that was sent
you! Have you tried the steps I provided to you? If you encounter any
difficulty, please do not hesitate to let me know. Please post here and let
me know the status of your issue. Without your further information, it's
very hard for me to continue with the troubleshooting.

Looking forward to hearing from you soon

Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!


Reply With Quote
  #3  
Old   
Jonathan Levine
 
Posts: n/a

Default RE: Importing UTF-8 Text Files via DTS - 09-23-2004 , 07:25 PM



""Mingqing Cheng [MSFT]"" wrote:
Quote:
Hi Jonathan,

I am just checking on your progress regarding the information that was sent
you! Have you tried the steps I provided to you? If you encounter any
difficulty, please do not hesitate to let me know. Please post here and let
me know the status of your issue. Without your further information, it's
very hard for me to continue with the troubleshooting.
Thank you very much for your reply. You definitely answered my question!

Regards,

Jonathan


Reply With Quote
  #4  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Importing UTF-8 Text Files via DTS - 09-24-2004 , 11:01 AM



What was the information? I think I missed that.

-Pete

Jonathan Levine <myfoo (AT) nospam (DOT) nospam> wrote:

Quote:
""Mingqing Cheng [MSFT]"" wrote:
Hi Jonathan,

I am just checking on your progress regarding the information that was sent
you! Have you tried the steps I provided to you? If you encounter any
difficulty, please do not hesitate to let me know. Please post here and let
me know the status of your issue. Without your further information, it's
very hard for me to continue with the troubleshooting.

Thank you very much for your reply. You definitely answered my question!

Regards,

Jonathan


Reply With Quote
  #5  
Old   
Jonathan Levine
 
Posts: n/a

Default Re: Importing UTF-8 Text Files via DTS - 09-27-2004 , 08:17 PM



Pete,

"Peter A. Schott" wrote:
Quote:
What was the information? I think I missed that.
The answer was no, there's no way to load UTF-8 via DTS directly.

I am using iconv (from cygwin) to convert from UTF-8 to UTF-16, then
loading that. But it should be easy to write something that's native windows
that opens a stream as UTF-8 and writes it as UTF-16 ("Unicode").

-- J

-- J



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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.