Wednesday, March 7, 2012

Import and Export foreign characters (non-DBCS only)

Hi
I have a table which stores the customer information...There is a Customer
Address column defined as nvarchar(50)...Data for the table is imported
using DTS Bulk Insert from a Customer.dat file...
My question: -
1. What are the requirements for me to view the foreign characters (Arabic,
Turkish, German, Italian etc...) using an editor. What setup needs to be
done on the server where the files reside.
2. How do I make the .dat file as a unicode file ?
3. Can I see the foreign characters by a simple select in query analyzer?
4. What are the requirements to export the file to contain all those foreign
characters?
Ps: - Focus is not on DBCS characters (Kanji characters etc...)
Any help would be much appreciated....
Thanks in advance...
ImtiazSee below.
Steve Kass
Drew University
Imtiaz wrote:

>Hi
>I have a table which stores the customer information...There is a Customer
>Address column defined as nvarchar(50)...Data for the table is imported
>using DTS Bulk Insert from a Customer.dat file...
>My question: -
>1. What are the requirements for me to view the foreign characters (Arabic,
>Turkish, German, Italian etc...) using an editor. What setup needs to be
>done on the server where the files reside.
>
As long as the data is stored as Unicode, and the client is Unicode
compatible, all you need is Unicode fonts in your editor.

>2. How do I make the .dat file as a unicode file ?
>
I don't know about DTS, but I think that bcp will leave out the
two-byte Unicode byte-order marker at the beginning of the file.
You may need to insert the two-byte sequence FFFE yourself
so that other applications will handle it correctly. For importing
back to SQL Server, this might be the wrong thing to do, though.

>3. Can I see the foreign characters by a simple select in query analyzer?
>
Yes. Just make sure the font in your results window is a Unicode font
(Arial MS Unicode, for example).

>4. What are the requirements to export the file to contain all those foreig
n
>characters?
>
Just export as Unicode and it should be fine.

>Ps: - Focus is not on DBCS characters (Kanji characters etc...)
>Any help would be much appreciated....
>Thanks in advance...
>Imtiaz
>

No comments:

Post a Comment