Dealing with foreign characters?

H

Hugh Janus

Hi all,

I have an app that analyzes files based on their time stamp. However,
in the file names are often 'non-english' characters like letters with
accents and the spanish ñ. This causes my app to 'see' the filenames
wrong. For example, a file with the word 'español' in it is seen
first as 'espaol' and then later as espanol in my app.

Anyone know of a built-in way to deal with this characters? Is there a
way to strip accents and force VB to see an 'ñ' as an 'n' ? Or am I
going to have to do this the hard way and write a function than looks
for these characters?

Thanks
 
H

Herfried K. Wagner [MVP]

Hugh Janus said:
I have an app that analyzes files based on their time stamp. However,
in the file names are often 'non-english' characters like letters with
accents and the spanish ñ. This causes my app to 'see' the filenames
wrong.

How does your application "see" the file names?
 
C

Cor Ligthert [MVP]

Hugh,

As far as I know uses Spanish the same code set as every western European
language.
(1252). However have a look at these pages.

Unicode
http://www.geocities.com/Athens/Academy/4038/graph/fontset.htm#b

OS systems
http://www.microsoft.com/globaldev/reference/oslocversion.mspx

I hope this helps a little bit?

Cor


"Hugh Janus" <[email protected]> schreef in bericht
Hi all,

I have an app that analyzes files based on their time stamp. However,
in the file names are often 'non-english' characters like letters with
accents and the spanish ñ. This causes my app to 'see' the filenames
wrong. For example, a file with the word 'español' in it is seen
first as 'espaol' and then later as espanol in my app.

Anyone know of a built-in way to deal with this characters? Is there a
way to strip accents and force VB to see an 'ñ' as an 'n' ? Or am I
going to have to do this the hard way and write a function than looks
for these characters?

Thanks
 
H

Herfried K. Wagner [MVP]

Hugh Janus said:
For example, a file with the word 'español' in it is seen first as
'espaol'.

Again: Where is the file seen? What are you doing with the file's name?
 
H

Hugh Janus

Herfried said:
Again: Where is the file seen? What are you doing with the file's name?

I use a directory walker to find all files. Then I do a simple
IO.File.Copy to copy the file elsewhere based on a criteria. I am not
doing anything with the files name.
 
D

**Developer**

For example, a file with the word 'español' in it is seen
first as 'espaol' and then later as espanol in my app.


You say the word is 'seen' twice. I think it would help to know what are the
two sets of VB code that see them?


Again: Where is the file seen? What are you doing with the file's name?

I use a directory walker to find all files. Then I do a simple
IO.File.Copy to copy the file elsewhere based on a criteria. I am not
doing anything with the files name.
 

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