Re: Filename Encoding Help
- From: "Adhal" <fakeemail@xxxxxxxxxxx>
- Date: Mon, 9 Jun 2008 00:29:39 +0100
Thanks Göran,
You can use any unicode encoding, like UTF-7, UTF-8, UTF-16 or UTF-32.
I suggest UTF-8, it's the most efficient for regular text, and it's the default for all methods reading and writing text files in .NET.
Basically this program stores filenames & and other file details and it is going to be used only on windows XP and Vista. I want to support all languages that the filenames are capable of.
The problem is I am almost certain that Windows XP stores filenames in UTF-16 but I am not sure what Windows Vista does. I don't want to use UTF-32 if I don't need it, as increases the file size unnecessarily. :-?
That depends on what characters the file names contains. The ASCII encoding only handles characters with character codes from 32 to 127. The ANSI character set will handle any characters in the ASCII character set.
It also depends on what you are going to use the file for. Is there any other program that will read the file?
Ok this one is a bit more puzzling for me. Again it is a program that stores file names on Windows XP and Windows Vista into a text file, however the file can be opened by Windows 9x/me.
Give you an example is best approach. I have Windows XP (Japanese) and I store the filenames in an ANSI text file. Now I take the file and open it up in Windows 98 (Japanese). I would expect the text file to open fine and all the characters appear fine. Am I right in my thinking?
My understanding is this works if I store it as ANSI but not as ASCII. I haven't got Japanese Windows 98 to test this out. :(
Appreciate the help :)
.
- Follow-Ups:
- Re: Filename Encoding Help
- From: Peter Duniho
- Re: Filename Encoding Help
- References:
- Re: Filename Encoding Help
- From: Göran Andersson
- Re: Filename Encoding Help
- Prev by Date: Re: Filename Encoding Help
- Next by Date: Powercf.exe & Windows Service
- Previous by thread: Re: Filename Encoding Help
- Next by thread: Re: Filename Encoding Help
- Index(es):
Relevant Pages
|