Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


bcp out in UTF 8 format


bcp out in UTF 8 format

Author
Message
rkjayaraj
rkjayaraj
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 19
I have SQL Server database table with International characters. Is there any way I can bcp out the table into csv file in UTF-8 format?
AndreT78
AndreT78
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 110
rkjayaraj (6/21/2008)
I have SQL Server database table with International characters. Is there any way I can bcp out the table into csv file in UTF-8 format?


I have the same Problem, but my Destination is TXT.


declare @pfad varchar(8000)

set @pfad = 'bcp "select * from I_Kunden_EMail with (nolock)" queryout
"\\Server\export\Emailadressen\email'+convert(varchar(10),getdate(),112)+'.txt" -T -t; -w '


exec xp_cmdshell @pfad



Which Parameters I need für UTF-8
AndreT78
AndreT78
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 110
i get an answer in on an other board.

The Parameters are : -c -C65001

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.de.sqlserver&mid=69849d78-9d68-4cf4-89e6-1da5e3bf3d57
s-e-i-y-a
s-e-i-y-a
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 161
AndreT78 (6/23/2008)
i get an answer in on an other board.

The Parameters are : -c -C65001

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.de.sqlserver&mid=69849d78-9d68-4cf4-89e6-1da5e3bf3d57



http://msdn.microsoft.com/en-us/library/ms162802.aspx

Micorsoft siaid "SQL Server does not support code page 65001 (UTF-8 encoding)."

No luck for me.
oliver 59000
oliver 59000
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 14
UTF-8 is not supported anymore for SQL Server 2008 (R2?), see http://msdn.microsoft.com/en-us/library/ms188365.aspx and go to CODEPAGE.

There's more info on the web as to why, but in short that's why it worked on SQL Server 2005 but not 2008 (R2).
AndreT78
AndreT78
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 110
the thread is from 2008
Leoa
Leoa
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 22
It is good to learn about how to bcp out the table into csv file in UTF-8 format. Thanks for posting the link to the answer.



Leo
Website: How to Make Money Online Resources
shashi.bhusan123
shashi.bhusan123
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
Hey ,
Alter native of UTF8 support in SQLSERVER 2008 R2
1. if u are importing multiligual file keep this in UTF16(UCS2[LE]) format rather than UTF8 because BCP import dont support UTF8 code page in MS SQLSERVER R2.
2.table where u importing multiligual character, column should be NVARCHAR type

Follow BCP Command for import data
bcp [DATABASE].[dbo].[tablename] in TestBCP.txt(UTF16 format) -S<SERVER> -U<USRName> -P<PWD> -C -w
option -w support widecharacter(after 256)

plz let me know if helps
thanks
Shashi
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search