On 25.11.2015 12:42, William A Rowe Jr wrote: > If the script switches setlocale to turkish, for example, our > forced-lowercase content-type conversion > will cause "IMAGE/GIF" to become "ımage/gıf", clearly not what the > specs intended. I'm sorry, could you elaborate on this? Would not strtolower(3) convert "IMAGE/GIF" to "image/gif" in /all/ locales -- including "C"? At least, in all single-byte charsets -- such as the Turkish ISO 8859-9 <https://en.wikipedia.org/wiki/ISO/IEC_8859-9>? Yes, the function will act differently on the strings containing octets above 127, but those would occur neither in content-types nor in header-names... > Adding unambiguous token handling functions would be good for the few > case-insensitive string comparison, string folding, and search > functions. It allows the spec-consumer to trust their string processing. Up until now, I thought, the thread was about coming up with a short-cut -- an optimization for processing tokens, like request-headers, which are known to be in US-ASCII anyway and where using locale-aware functions is simply wasteful -- but not incorrect.
You seem to imply, the locale-aware functions might be doing the wrong thing some times -- and this confuses me... Yours, -mi