Ihsan Ahmed · Jun 28, 2020

Stream Read - Multi Languages

Hi, I am doing a stream read so that I can do some inserts to the table however other language read is not supported, any idea what I need to do to achieve this? 


0 142
Discussion (4)1
Log in or sign up to continue

Not sure what doesn't work for you. Could you please share an example? Or elaborate the problem?

Hi, Thank you for your response.. I am writing a routine to upload some data to the table, the language I am looking to upload the data is actually arabic, but it inserts gibrish.. any idea how I could support Arabic inserts.. if i insert directly through the DBMS Inserts.. it goes through perfectly... so this is something to do with the reads of the file...any help in this is greatly appreciated.

If it's a File Stream you can set TranslateTable property to your charset before reading.

Otherwise you can use $zcvt function to convert strings.

Here's an example of iterating encodings for $zcvt to determine a correct encoding.

If you are interested in encoding internals use zzdump to check hexdumps.

If your encoding is region specific don't forget to set your locale.

great, it worked... did the below

Do stream.TranslateTableSet(“UTF8”).