dbTalk Databases Forums  

bcp french characters

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss bcp french characters in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jason Thompson
 
Posts: n/a

Default bcp french characters - 11-20-2003 , 09:11 AM






I am trying to bcp a table to a flat file, and the output does not contain some french characters that are in my data. It replaces them with some invalid characters
The command I am using is
bcp tablename out c:\data\tableName.txt -c -

The -c and -6 are necessary due to some restrictions on the import side of things
Is there some option I have overlooked? I looked at the other bcp options and only saw -R that might apply, but didn't seem to help when I added it.

Reply With Quote
  #2  
Old   
Rand Boyd [MS]
 
Posts: n/a

Default RE: bcp french characters - 11-21-2003 , 11:11 AM






You might try using the -C parameter and specify the code page that SQL
Server is uisng. You can get this by using the sp_helpsort procedure. You
should see something in the outpu that looks like this:

Code Page 1252 for non-Unicode Data

Use that number with the -C parameter.

Rand
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #3  
Old   
Jason Thompson
 
Posts: n/a

Default RE: bcp french characters - 11-21-2003 , 02:01 PM



I don't get anything that looks like that when I run that proc

This is what I get

Unicode data sorting
----------------------
Locale ID = 1033

case insensitive, kana type insensitive, width insensitiv


Sort Order Description
------------------------------------------------------------------------------------------------------------------------------------
Character Set = 1, iso_
ISO 8859-1 (Latin-1) - Western European 8-bit character set
Sort Order = 52, nocase_is
Case-insensitive dictionary sort order for use with several W
stern-European languages including English, French, and Germa
. Uses the ISO 8859-1 character set

Characters, in Order
------------------------------------------------------------------------------------------------------------------------------------
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { |
~ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ * ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½
¿ × ÷ 0 1 2 3 4 5 6 7 8 9 A=a À=* Á=á Â=â Ã=ã Ä=ä Å=å Æ=æ B=b
=c Ç=ç D=d E=e È=è É=é Ê=ê Ë=ë F=f G=g H=h I=i Ì=ì Í=* Î=î Ï=ï
=j K=k L=l M=m N=n Ñ=ñ O=o Ò=ò Ó=ó Ô=ô Õ=õ Ö=ö Ø=ø P=p Q=q R=r
=s ß T=t U=u Ù=ù Ú=ú Û=û Ü=ü V=v W=w X=x Y=y Ý=ý ÿ Z=z Ð=ð Þ=

Just for kicks, I tried using -c -6 -C1033

Didn't work. Got an error that looked like this
SQLState = S1000, NativeError = 8
Error = [Microsoft][ODBC SQL Server Driver]Unicode conversion failed. The code page of the SQL server must be installed on the client system

The interesting thing is it looks like I only got this error for rows that have french characters in them


Reply With Quote
  #4  
Old   
Rand Boyd [MS]
 
Posts: n/a

Default RE: bcp french characters - 12-02-2003 , 01:34 PM



Try using t -c -6 -C1252

Rand.
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.