Unicode/Korean characters

K

KC8DCN

Hello,

I have a field in an table in Access that contains both English and Korean
characters. I can view the Korean fine in the table, but when I write the
contains of the table out via VBA, the Korean characters change to question
marks. I've tried using StrConv but that doesn't work.

Is there a way to effective write unicode out to a text file?
 
T

Tom van Stiphout

On Sun, 26 Apr 2009 16:19:01 -0700, KC8DCN

You could use the FileSystemObject. Set a reference (code window >
tools > references) to Microsoft Scripting Runtime. Then write
something like this:
Const strFile As String = "c:\test.txt"
Dim fso As Scripting.FileSystemObject
Dim f1 As Scripting.TextStream

Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile(strFile, True, True) 'NOTE: last True
makes this a Unicode file)
f1.WriteLine "Your Korean Text"
f1.Close
Set f1 = Nothing
Set fso = Nothing

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top