Skip to content
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

non UTF-8 encoding not available since mintlocale-1.5.5 #74

Open
wateo355 opened this issue Sep 23, 2020 · 6 comments
Open

non UTF-8 encoding not available since mintlocale-1.5.5 #74

wateo355 opened this issue Sep 23, 2020 · 6 comments

Comments

@wateo355
Copy link

wateo355 commented Sep 23, 2020

mintlocale version: 1.5.5
cinnamon version: 4.6.7

We are using linux mint 20 from Belgium, as java developers and need to have a locale configured with encoding ISO-8859-1 (enterprise policy).
Since mint 20 we cannot chose this encoding anymore and are stuck to UTF-8. By reading the python code located in mintlocale.py we discovered that this piece of code was added: Lines 611->613:

# Only allow UTF-8 locales
     if "UTF-8" not in line:
              continue

The explanation of the commit says that mixing non UTF-8 encoding with UTF-8 encoding can lead to some not expected behaviour or bugs on the system....
But How about not mixing, but put the whole system to ISO-8859-1 encoding ?!!

Finally, a quick patch for us was to comment those lines, it had for effect that we were able to chose again the encoding we want in mintlocale interface.
So if someone can consider this problem and think for a fix, it would be great!

Thanks!

@clefebvre
Copy link
Member

Hi,

Please tell us more about the reason for this policy. What is the reason to require this encoding? What do you need from it that isn't provided by the UTF-8 locale?

Thanks.

@wateo355
Copy link
Author

Hi,

We are developing a legacy application that has a huge number of files encoded in this encoding, this is not an option for us to go to UTF-8 cause it will force us to migrate a lot of files .... (which is not foreseen at all).
We are using linux mint since a few years now, without having any problem to setup the encoding to ISO-8859-1...so why stopping this support ? and why limit all users to UTF-8 only ...?

thanks.

@clefebvre
Copy link
Member

Because it works for everybody. It's supposed to include support for all languages. If the application specifically requires an ISO-8859-1 encoding when dealing with its files, why not just have the application specify this encoding and use it? The OS itself can be UTF-8.

@wateo355
Copy link
Author

It does not work for everybody as it's not working for us !. The application is actually configured to handle ISO-8859-1 files, that's not a problem. But we are not dealing with an application configuration problem, we have our infrastructure servers (redhat) configured natively with ISO-8859-1 in the OS itself and would like to have our development machines with the same configuration to avoid any problem when deploying the app on our servers......
But anyway this is not the real problem, my question is:
While it was possible in previous mint versions to chose our OS base encoding, why is it not possible anymore ? (and i know it's "working for everybody" .. but then why not putting the OS to UTF-8 by default and let the users chose if they want to use another encoding ?)

@clefebvre
Copy link
Member

Ah, it was removed because it was leading to segfaults and encoding conflicts.

Most people don't know about encoding, they just choose their language and when faced with multiple choices they pick one randomly. We found out people were confused by choices they didn't need or understand and when chasing bug reports with applications in python segfaulting we found out the cause was that some people picked conflicting mixes of encoding locales, so we removed non-UTF-8 locales from the choice.

We could add a setting to list them all, though it's really niche, we don't have a preferences page for mintlocale, and non-UTF-8 locales can still be set, just not graphically through mintlocale.

@wateo355
Copy link
Author

Yes your proposal to add a setting to list other encodings looks nice ! Maybe we can change locales via the command line ... but as mintlocale is supposed to be the place to set the locales properly for the entire system, it would really be a good solution to have such "hidden/custom gui button" or something similar to enable some (niche/developer) users to chose a non-UTF-8 locale ;-)

Can we hope to see this kind of solution in a future update/release ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants