-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if applied locale correctly lowers chars and fallback #19905
Conversation
05b8f7a
to
f39ef29
Compare
Got an ACK from @hbayindir in the Debian bug report thread:
Let's start the review? |
@fuzzard @lrusak @Rechi @phunkyfish @DaveTBlake Sorry I dont see who is actually code owner of |
defff5f
to
114ee13
Compare
@lrusak Fixed, thanks! Not sure if |
114ee13
to
612c4d8
Compare
Yes, default region is marked as 'N/A' but the locale info is displayed as INFO:
I think there's no need to move ifdeffery from https://github.com/xbmc/xbmc/blob/master/xbmc/LangInfo.cpp#L222 into a separate function |
I think it's fine as is. The only other thing I can say is maybe change to |
612c4d8
to
c3a0b37
Compare
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did not see this bug on windows 10 with turkish language (system and kodi) installed.
unfortunately can't test android and osx... android would be interesting though
I just tested 19.1 from F-Droid in my LineageOS tablet and it seems Android is not vulnerable due to https://github.com/xbmc/xbmc/blob/19.1-Matrix/xbmc/LangInfo.cpp#L297 In fact,
No, we need to unset |
@phunkyfish can you please run unpatched 19.1 on OSX with Turkish system and Kodi language and check whether the bug manifests? |
How exactly do I do that? Being a native English speaker I never deal with other languages!!! |
Temporary set system language to Turkish (you can leave region intact!) and start Kodi, then install Turkish language via Settings - Interface - Region and language then restart Kodi and check if movie windows, poweroff prompt etc are readable.
|
How will I know if they are readable? If there is a screenshot of what they should look like? |
Screenshots of affected Kodi are in #19883. Settings pane has buttons with captions and images if not affected but is empty if it is. |
Yes, thanks! So it is Linux-only issue!
|
should be ready after it got a bit love and polishing 😉 |
Yeah, I paused this after I tried to move |
.. to default region if it does not. Fixes xbmc#19883. Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
c3a0b37
to
c7b3935
Compare
@howie-f I fixed the points you brought on the last review! Unfortunately I could not get rid of un-setting environment variables in std::setlocale(LC_ALL, "C");
std::locale::global(std::locale("C")); I think we should go with battle-tested code here, and the fact that |
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Sorry, I don't want to be PITA, but shouldn't we try to find and fix the root cause of this problem instead of polluting Kodi code base with workarounds? |
One of root cases of this problem is that https://github.com/xbmc/xbmc/blob/19.1-Matrix/xbmc/filesystem/SpecialProtocol.cpp#L207 uses lower/upper functions to find files in a case-insensitive manner. There are others + some that even I failed to figure out by today :( I am OK to solve that issue completely, but I am really afraid (see my comments in 19883) that the 'true' fix will be greater than CDateTime one :( |
Let's do the job right and bite that bullet. Kodi "survived" without this fix for many many years. I don't see the need for this kinda special case to hurry and go with a workaround. |
Matrix users from Turkey already reported this on r/kodi and in Debian. I am OK to hold this for Nexus, but Matrix should be worked around. I do ship the fix already in Debian, but Manjaro / Arch / Gentoo users still lack it. Should we leave it as-is in such case? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't see this in master. This is only a workaround and we know that the root cause is in Kodi code base. So, let's fix it properly.
I do agree. |
I've made some formatting changes to meet the current code style. The diffs are available in the following links: For more information please see our current code style guidelines. |
… Kodi workaround Kodi unsets LC_CTYPE since xbmc/xbmc#19905 was merged, so DownloadIt errored if the title contained non-ASCII characters.
.. to default region if it does not.
Fixes #19883.