Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

bcp out in UTF 8 format Expand / Collapse
Author
Message
Posted Saturday, June 21, 2008 7:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 23, 2008 1:20 AM
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?
Post #521213
Posted Monday, June 23, 2008 6:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, April 04, 2014 8:00 AM
Points: 32, Visits: 105
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
Post #521688
Posted Monday, June 23, 2008 8:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, April 04, 2014 8:00 AM
Points: 32, Visits: 105
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

Post #521842
Posted Monday, March 08, 2010 9:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 29, 2013 10:09 PM
Points: 7, Visits: 148
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.
Post #879077
Posted Saturday, March 26, 2011 12:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 26, 2012 7:18 PM
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).
Post #1084470
Posted Wednesday, March 30, 2011 12:02 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, April 04, 2014 8:00 AM
Points: 32, Visits: 105
the thread is from 2008
Post #1085990
Posted Tuesday, May 17, 2011 9:25 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, May 22, 2011 9:06 PM
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



Post #1110703
Posted Wednesday, August 03, 2011 6:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 16, 2012 3:26 AM
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
Post #1153443
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse