Query on /etc/profile.d/glib2.sh
Code:
#!/bin/sh Or, given that @locale sounds like it ought to work for both utf8 and non-utf8 locales, why not just set it to @locale which should work in both cases. I freely admit that I know very little about glib. Am I looking at this wrong? update: After reading this it sounds like G_FILENAME_ENCODING='@locale' and G_BROKEN_FILENAMES=1 do the same thing? |
Actually after doing some reading on the subject, I've come to the conclusion that it's all just broken anyway and the only sensible thing to do is use a utf8 locale, in which case non of these settings are of any use anyway.
|
... And the names of many locales encoded in UTF-8 do not include UTF or utf.
This script lists them: Code:
#/bin/sh |
Yep, I'd already changed libglib.sh to be:
Code:
if [ "$(locale -k charmap)" = 'charmap="UTF-8"' ]; then At which point, I lost heart and went to eat some chocolate to make me feel better. |
This thread got mentioned in another thread, so I thought it best to reply here in the original topic to keep things tidy.
Quote:
G_BROKEN_FILENAMES=1 is just an older and misleadingly named way of specifying G_FILENAME_ENCODING=@locale. They do exactly the same thing. One only really needs to set this when not using a utf-8 locale as the default behaviour is to run as if G_FILENAME_ENCODING=UTF-8,@locale was specified, which in the case of utf-8 locales is essentially the same as above. The reason why non-utf8 locales will want to set G_FILENAME_ENCODING=@locale is that it's possible for some non-utf8 sequence to be interpreted as a valid utf8 sequence, so it's safest to prevent that. P.S. this is really just revisiting some of the things I said in post #1, only I'm a little more confident in my understand of all this 4 years later. ;) |
Quote:
Code:
if [ ! "$(locale -k charmap)" = 'charmap="UTF-8"' ]; then |
You don't need to set both. One or the other will suffice.
As you say, if you care about environment size then you may want to also wrap it in a conditional so that it's not taking up env space when unneeded. Personally I just chmod -x this file. |
Deleted: didn't make sense; you're right GazL.
|
All times are GMT -5. The time now is 11:06 AM. |