SQLTeam.com | Weblogs | Forums

Is the Japanese word garbled?


#1

Hello everyone! i have a question . Export text using Dts,Open garbled,There is convert function, for example.
convert(char(6),' '), Whether there will be six empty characters for 6 bits.
thank you for help.


#2

I can't even begin to understand what you're talking about. Please post some example input and output


#3

ok, when Japanese in sql server,it show normally,but export data to txt file, japanese is not noramlly,I use SSIS to export the data in the text, will be garbled. do you understand my mean?,please tell me.thank you .


#4

Japanese will be exported as extended character set (2-bytes per character)

If you have exported to a file then you need to use an editor that will recognise that the file is using extended characters, otherwise the editor will assume 1-byte per character and what you see will look like rubbish.

Also, whatever is doing the export needs to output as extended characters.

In SQL you need to use Nvarchar (2 bytes per character) to hold the extended Japanese characters. If at any point they are converted to Varchar (1-byte per character) then the result will be rubbish