Link to home
Start Free TrialLog in
Avatar of Frosty555
Frosty555Flag for Canada

asked on

Read unicode filenames and put it into a URL

I'm not very experienced with the multilingual/unicode aspects of Windows... so I'm not sure where to begin here.

I have a folder with a number of files in them. Some of the files have unicode names... some contain chinese characters and russian characters, etc.

So what I need to do is read in these file names into a string, such that I preserve the unicode values. Dir() is woefully inadequate for that ;) I think FindFirstFileW() can do it... but I haven't had any luck getting it to work and I feel like there ought to be a managed .NET way of doing this.

The next thing I need to do is pass this unicode string to a webpage, as a parameter in the URL. I don't need code to actually PERFORM the query to the website, I know how to do that. But I don't know how to format the url to include unicode characters. What kind of string would I need to pass as the url? Some kind of unicode string? Or do you convert the unicode characters into some kind of %U12423 type formatting?

I'm looking to do this in VB... whether it is VB.NET or VB6 all depends on which way would be simpler ;) I get the feeling this has already been done nicely in VB.NET I just don't know where it is.
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Frosty555

ASKER

Yep perfect that worked well!

I knew it couldn't have been that hard ;)