Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Alternatives to atoi and tolower

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 7 Jul 2017 01:43:57 -0700
On Jul 7, 2017, at 1:08 AM, Pascal Quantin <pascal.quantin@xxxxxxxxx> wrote:

> g_ascii_tolower

Note: in a given locale, "i" isn't necessarily the lower-case version of "I".

In fact, it's definitely *not* the lower-case version of "I" in Turkish.  This caused crashes at one point:

	https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2010

g_ascii_tolower() gives the same answer in all locales.  If you're dealing with a configuration file, then, unless the configuration file's language is based on Turkish (or Azerbaijani, Kazakh with the Roman alphabet, Tatar with the Roman alphabet, or Crimean Tatar, if the Wikipedia page

	https://en.wikipedia.org/wiki/Dotted_and_dotless_I

is correct), that answer is the one you want.  (And if it *is* based on one of those languages, you would *still* want the same answer in all locales, as there's no guarantee that the file would only be read in a Turkish, Azerbaijani, Kazakh, Tatar, or Crimean Tatar locale, so you'd have to map "I" to "ı" and "İ" to "i".)