Re: git on MacOSX and files with decomposed utf-8 file names
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 23, 2008, 17:32 UTC
- Message-ID
- <alpine.LFD.1.00.0801230930390.1741@woody.linux-foundation.org>
- In-Reply-To
- <98F90EB6-1930-4643-8C6C-CA11CB123BAA@sb.org>
On Wed, 23 Jan 2008, Kevin Ballard wrote:
Show 5 quoted lines
> > Well yes, any context in which a string is treated as Unicode instead of an > opaque sequence of bytes will probably lead to normalization at some point > (e.g. when searching text, I'm going to want Märchen and Märchen to be treated > as the same string).
As pointed out (multiple times), this is only true if the programmer is a moron.
You do not need to - and *should* not - convert to a common normalization in order to compare to Uncode strings. You should just compare them with a Unicode-aware comparison routine. It will be faster, and it will avoid corrupting the input.
Sadly, stupid people are much too common.
Linus