Boost Users :
Subject: Re: [Boost-users] Boost-users Digest, Vol 1984, Issue 2
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2009-05-04 14:03:55
> Date: Sun, 03 May 2009 21:43:59 +0100
> From: Chris Spencer <spencercw_at_[hidden]>
> Subject: [Boost-users] Filesystem: Case insensitive search on case
> sensitive systems
> To: boost-users_at_[hidden]
> Message-ID: <49FE020F.6030905_at_[hidden]>
> Content-Type: text/plain; charset=UTF-8
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hi all,
> I am writing a cross-platform program which takes path names from a
> Windows-originating file. As such, there is no guarantee that the
> match the case of what is actually stored in the file system. Does
> anyone have any advice on the best way to do a case-insensitive search
> to get the correct path?
> Thanks, Chris.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> -----END PGP SIGNATURE-----
For NTFS, the rules are in the $UpCase (reserved file #10) in the root
directory. But don't forget that short-name aliases are also matched
For FAT, the rules depend on the OEM Code Page used. That's not just
because the chars are encoded differently, but the rules are different
too. Specifically, does upper-casing a letter keep or remove an accent
mark? Or, do some letters not have case equivalents at all? But now
FAT has a "longname" in there also, which is stored in USC2.
There's the ISO file system used on CDs, with or without Joliet
extensions. There's the UFS file system on DVDs. Both have their own
standards on what case-insensitivity means, which may or may not be
followed by the OS to various degrees.
Basically, the rules are specific to the file system and the individual
media. If you know those rules (try looking at ReactOS), you still have
to match each subdirectory along the path individually and watch for
symbolic links and reparse points which can shift you to a different
volume with different rules in force.
(sorry about the footer)
TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net