Ascii Text to Unicode conversion

Ascii Text to Unicode conversion

isocam
Collaborator Collaborator
584 Views
3 Replies
Message 1 of 4

Ascii Text to Unicode conversion

isocam
Collaborator
Collaborator

Can anybody help???

 

I have the following visual basic code:

 

sFileName = "C:\Test Folder\Test.dxf"

 

sFileName = StrConv(sFileName, vbUnicode)

 

msgbox (sFileName)

 

But, when I run it it does not seem to work.

 

(All I require is the UniCode equivalent)

 

Has anybody got any suggestions

 

Many thanks in advance!!!

0 Likes
585 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

What's the ultimate goal?

0 Likes
Message 3 of 4

isocam
Collaborator
Collaborator

Hi,

 

Many thanks for your reply!

 

I need to send a Unicode string to a windows API, but the filename that I am using in ASCII.

 

The API is located in a commercially available dll file.

 

Kindest Regards

 

IsoCAM

0 Likes
Message 4 of 4

Anonymous
Not applicable

The MSGBOX won't display the unicode characters, but if you hover over the variable sFileName while in debug mode, it should show you the proper characters.

 

You can confirm it via the method below:

 

MsgBox StrConv(sFileName, vbFromUnicode)

0 Likes