aMule Forum
English => en_Bugs => Topic started by: gagar on December 22, 2011, 01:05:38 AM
-
Hi,
I think I remarked some weird bug in the way country flags are displayed when aMule (2.2.6 under Ubuntu 10.04.3 amd64) uses the Turkish language. The country is properly detected from the GeoIP data, but there seems to be a character mapping issue with the country code which prevents the flag from being displayed properly. This specifically happens with country codes including the letter "I", such as "it" or "il" (please see the attached screenshot and note that the country codes are displayed erroneously, as "ıt" or "ıl" whereas they should be "it" and "il").
The thing is that in Turkish there's the "i" letter, which, in capitalized form, is written as "İ" (note that the dot is preserved). That's the usual "i" we all use. And then there's "ı", the "i without the dot", which, when capitalized, gives "I", which looks like the usual capital i in all Roman scripts. The trick is that in Turkish it's considered the capital form of "ı". So we have "I, ı and İ, i". There's a much better and detailed explanation on Wikipedia (http://en.wikipedia.org/wiki/Turkish_dotted_and_dotless_I).
So my hypothesis is that at some point, the aMule thinks that "I" is an "i" whereas it's in fact a different letter, the "ı". Which in turn prevents the flag from being displayed.
PS: If the problem indeed originates from a confusion between these two letters, it really should be limited to that "i without the dot case" as this letter is only found in Turkish and in some other Turkic languages (and in Irish (http://en.wikipedia.org/wiki/Tittle#Dotless_and_dotted_i)). And there are no other similar funky cases in the Turkish alphabet.
-
Your hypothesis is totally correct. Problem was, GeoIP returns uppercase country codes, flag codes are lowercase, and wxString::MakeLower() fails in Turkish, converting 'I' to 'ı' instead of 'i'.
Fixed in SVN 10697. Not pretty, but working. :-\
(now I'm fumbling inside a Turkish looking aMule trying to return it to something I can read... ;) )
-
Your hypothesis is totally correct. Problem was, GeoIP returns uppercase country codes, flag codes are lowercase, and wxString::MakeLower() fails in Turkish, converting 'I' to 'ı' instead of 'i'.
Fixed in SVN 10697. Not pretty, but working. :-\
Great, thank you. Do you think it would make sense to file a bug upstream? I'd happily do it but first I'd like to avoid filing a duplicate bug and second, I'm part of the 99%. But you... you're different, you speak C++ so you can explain the problem much better than me and possibly submit a patch. You could save lives (http://gizmodo.com/382026/a-cellphones-missing-dot-kills-two-people-puts-three-more-in-jail) by doing so, honest!
(now I'm fumbling inside a Turkish looking aMule trying to return it to something I can read... ;) )
Heh, that was my favourite game once upon a time: pick a mobile phone, switch it to Turkish and have fun looking at the other guy. This new variant is fun, too :P
-
Chinese works even better. :)
Do you think it would make sense to file a bug upstream?
With Ubuntu? Rather not.
Mind, 2.2.6 is obsolete. 2.3.1 is current release, and it's not yet in Ubuntu. And this patch will be in 2.3.2 or 2.4, we haven't planned a new release yet. 2.4 will not happen for a while, and 2.3.2 only if something critical comes up.
I suggest you build current SVN for yourself, see here (http://wiki.amule.org/index.php/HowTo_Compile_In_Ubuntu).
-
About upstream I was thinking to WxWidgets folks (since they seem to manage the wxString class) so that the report benefits more people.
I suggest you build current SVN for yourself, see here (http://wiki.amule.org/index.php/HowTo_Compile_In_Ubuntu).
I'll try that. After all the world ends in 2012, right?
-
This isn't a wx bug. Problem is we are trying to perform a case conversion of a non-Turkish text ('IT') in Turkish localization. This can only fail.