Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bcp out in UTF-8 format

1,358 views
Skip to first unread message

Jay

unread,
Jun 21, 2008, 8:42:28 AM6/21/08
to
I have SQL Server database tables with international character
support. Is there any way I bcp out the table in UTF-8 format csv
files?

Erland Sommarskog

unread,
Jun 21, 2008, 9:44:59 AM6/21/08
to
Yes. Use character format -c, and specify the UTF-8 codepage with the -C
option. For example:

bcp Northwind..Customers out cust.bcp -c -C 65001 -T

It does not seem that that BCP adds a BOM (byte-order mark) first in the
file.


--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0 new messages