View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] maralikatti@gmail.com is offline
external usenet poster
 
Posts: 3
Default Chinese characters - UTF8 CSV files

Hi Michel,

That worked !! Thanks a lot.

But still I'm seeing "??" marks instead of chinese characters in CSV
file. Do you have any idea about this?

Thanks in advance.

Regards,
Manju

Michel Pierron wrote:
Re Manju,
Excuse me, there is an error of text in the procedure, one needs an equal
sign between .CharSet and SetChar:
.CharSet = SetChar ' sets stream encoding (UTF-8)

Regards,
MP

a écrit dans le message de news:
...
Hi Michel,

Thanks a lot for the response. I'm getting "450 Wrong number of
arguments or invalid property assignment" error when I use the below
code.

Since I'm very new to VB, please bare with me. Thanks a lot in advance.

Regards,
Manjunath A.

Michel Pierron wrote:
Hi Manju,
Write your csv file in first and try to convert it then into sending the
full path name of your file like argument to the procedure below:

Sub Encode(ByVal sPath$, Optional SetChar$ = "UTF-8")
With CreateObject("ADODB.Stream")
.Open
.LoadFromFile sPath ' Loads a File
.Charset SetChar ' sets stream encoding (UTF-8)
.SaveToFile sPath, 2 ' adSaveCreateOverWrite
.Close
End With
End Sub

Regards,
MP

a écrit dans le message de news:
...
Hi All,

I'm facing problem while showing the Chinese characters in CSV file.
I'm using Open for Append Access Write As method to create the CSV file
programmatically. If I set the CSV file character set to UTF-8 then I
can display the Chinese characters. But I'm not able to set the CSV
character set to UTF-8 programmatically.

I'm using VB6.0 for this.

If anybody knows this please let me know. Thanks a lot in advance.

With love,
Manju