BULK LOAD UTF-8 type (Arabic or Persian) data
lop2lop
✭
Hello everyone.
When I try to Bulk Load data in UTF-8 type (Arabic or Persian) using COPY FROM STDIN, it converts Arabic or Persian characters to question marks !
My COPY statement is :
COPY Person_T(ID,fName,lName) FROM STDIN RECORD TERMINATOR E'\n' DELIMITER E'\t' ENFORCELENGTH NO COMMIT;
In INSERT or UPDATE statement it works great but COPY not.
I set Locale to fa_IR using SET LOCALE TO fa_IR; but nothing changed.
Is there any chance ?
thanks.
0
Best Answer
-
lop2lop ✭
I found the solution by myself .
My problem was that I used
byte[] buff = Encoding.Default.GetBytes(sbText.ToString());instead of
byte[] buff = Encoding.UTF8.GetBytes(sbText.ToString());0