Solved

Convert Data in a txt file to utf-8 format

Posted on 2004-08-03
4
1,099 Views
Last Modified: 2007-12-19
I am trying to import data from a text file to a SQL2000 table as utf-8 formate. The data in the text file is in Chinese and not in utf-8 format. This will need to be done with a Scheduled DTS.
0
Comment
Question by:awu25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:jdlambert1
ID: 11711817
Shouldn't be a problem if you make the destination table first, using the nchar or nvarchar datatypes. This stores unicode (UCS-2). Then just use DTS normally. No collation specifications are necessary for storing Chinese characters in a unicode column, but you might want to consider specifying a Chinese collation for the column when you create the table (simplified or traditional) if you're going to order output based on it.
0
 

Author Comment

by:awu25
ID: 11711896
I have done all that. If I use the Enterprise Manager installed on a Chinese XP and import the file manually without going thru DTS then it works fine. It is when I import from an English OS does it import garbage.
0
 
LVL 15

Accepted Solution

by:
jdlambert1 earned 500 total points
ID: 11711930
Hmm. Try changing your local code page -- even if your OS is in English, you can use a non-English Collation.

"In Control Panel, find the Windows locale name in the Regional Settings application (Microsoft® Windows NT® 4.0, Microsoft Windows® 98, and Microsoft Windows 95) or the Regional Options application (Microsoft Windows 2000), and then use this table to find the corresponding Collation Designator and code page:

Windows locale, LCID (locale ID), Collation designator, Code page
Chinese (Taiwan) 0x30404 Chinese_Taiwan_Bopomofo 950
Chinese (Taiwan) 0x404 Chinese_Taiwan_Stroke 950
Chinese (People's Republic of China) 0x804 Chinese_PRC 936
Chinese (People's Republic of China) 0x20804 Chinese_PRC_Stroke 936
Chinese (Singapore) 0x1004 Chinese_PRC 936
0
 

Author Comment

by:awu25
ID: 11712189
Problem solved by chaning the windows locale. Thank you
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question