Re: Long, long file names?

From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 11/03/04


Date: Wed, 3 Nov 2004 20:13:31 +0100


"Supply and Demand" <ask_me_for_it@and_I_might_tell.you> wrote in message
news:cmb4qc$qi$1@news.island.liu.se...

[...]
> MSDN says that the file name itself can be 255
> characters long if the unicode versions of some
> functions are used.

Yes, notably CreateFileW, I'd guess. This would be the
bit that also says "and prepend "\\?\" to the path."?
And "For more information, see Naming a File."?

> [...] MSDN also says that Windows always
> stores file names in unicode.

On NTFS, probably always. On FAT, long filenames, yes.
Short filenames, no (that being the backwards compatible
part).

> This means that CreateFileW() must be used instead
> of AssignFile()/Rewrite()?

Ah, there's your CreateFileW. Yes. If you want raw access
to Windows features, you forego the more or less portable
Pascal RTL.

Groetjes,
Maarten Wiltink



Relevant Pages

  • Re: Illegal Mac file names on 2000 server...
    ... Macintosh computers can use many characters for filenames that are illegal for x86-based ... accessed by a Unicode unaware application. ...
    (microsoft.public.win2000.networking)
  • Re: Long, long file names?
    ... > Yes, notably CreateFileW, I'd guess. ... >>stores file names in unicode. ... On FAT, long filenames, yes. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Windows Media Player has encountered a problem and needs to close
    ... program to search through the ID3 headers and filenames for unicode ... I'd bet that's the Unicode ID3 crash that will be fixed in nine days ...
    (microsoft.public.windowsmedia.player)
  • Re: java.util.zip not handling Unicode filenames
    ... but the filenames are garbled. ... The ZIP file format is not Unicode aware. ... specify the charset used when decoding the binary form of the names. ... AND all the characters are in the 16-bit Unicode ...
    (comp.lang.java.programmer)
  • Re: LANG, locale, unicode, setup.py and Debian packaging
    ... We are not talking about arbitrary files, right, but about font files? ... are for non-ASCII characters. ... came from usenet years ago and so have filenames mangled all to hell. ... alongside unicode and where I can't get to the unicode for that string, ...
    (comp.lang.python)