Boost logo

Boost :

From: Yitzhak Sapir (yitzhak.sapir_at_[hidden])
Date: 2006-08-20 07:48:06

Bronek Kozicki wrote:

> Yitzhak Sapir wrote:
> >

> this article is obsolete and does not refer to any current version of Windows.
> Any national characters can be used in a filename. For details see:

Obviously, your article does not mention question mark and asterisk. Those are
understandably invalid characters in the middle of the filename. Apparently,
some UNC names can have a ? At the appropriate place in the filename. But this
does not mean that all or most "?" characters are valid. Furthermore, even if the
article is obsolete for new versions of Windows, the filesystem is expected to
cover all or as many as possible versions.

> > with a question mark or asterisk. Also, the implementation seems to
> > attempt to validate any name unless it has these characters whereas it
> > could use a "valid list" like the unix implementation does.

> there is no "valid list" on current versions of Windows. There is only a small number of
> characters that cannot be used in filenames and that's it. The article you are refering to does
> not apply to current versions of Windows.

I quoted one article that dealt with up to NT versions, and one that dealt with Windows 2000.
The XP system I use does not allow "?" in the middle of the filename (it returned error code

> > "CreateFile(filename, GENERIC_READ, 0, NULL,

> ... and trigger implicit conversions from some random 8-bit codepage to internal Unicode
> representation? I'd much more prefer if programmers use directly Unicode variants of Windows
> API (eg. CreateFileW ), or at least be aware of conversions they DO NOT control taking place.

Yes, I should have used CreateFileW rather than CreateFile in that comment. The idea is
that the only way to identify all possible legal file names, may be to use the CreateFileW
function itself.

Yitzhak Sapir

Boost list run by bdawes at, gregod at, cpdaniel at, john at