?
Solved

Convert Data in a txt file to utf-8 format

Posted on 2004-08-03
4
Medium Priority
?
1,108 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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