Page MenuHomeFreeBSD

Switch C.UTF-8 as the default locales
ClosedPublic

Authored by bapt on Oct 27 2020, 3:37 PM.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bapt requested review of this revision.Oct 27 2020, 3:37 PM
cem added a subscriber: cem.

Caveat: I am mostly unfamiliar with login.conf. There seems to be an extra space on the umask line between : and \. Otherwise, the change looks good to me.

This revision is now accepted and ready to land.Oct 27 2020, 3:49 PM

Remove unneeded extra space

This revision now requires review to proceed.Oct 27 2020, 3:52 PM
This revision is now accepted and ready to land.Oct 27 2020, 4:15 PM

Great news!

This probably deserves a RELNOTES entry.

This probably deserves a RELNOTES entry.

Yeah, we definitely want that, also a link to info on C.UTF-8 and a brief indication of other systems that also use it.

Is vi ready for preserver files not-complained to UTF?

Sure smells a lot like overwhelming consensus...

This revision was automatically updated to reflect the committed changes.

After this change, perl freaks out like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "C.UTF-8"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
panic: locale.c: 4560: Could not change LC_CTYPE locale to C.UTF-8, errno=22

Is this expected? This is perl5-5.32.0

Thanks

After this change, perl freaks out like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "C.UTF-8"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
panic: locale.c: 4560: Could not change LC_CTYPE locale to C.UTF-8, errno=22

Is this expected? This is perl5-5.32.0

Thanks

My issue appears to have been caused by building with WITHOUT_LOCALES=YES. Removing that makes perl happy again. Sort of odd that nothing else cared.

My issue appears to have been caused by building with WITHOUT_LOCALES=YES. Removing that makes perl happy again. Sort of odd that nothing else cared.

should we add a note to src.conf(5) then?

After this change, perl freaks out like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "C.UTF-8"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
panic: locale.c: 4560: Could not change LC_CTYPE locale to C.UTF-8, errno=22

Is this expected? This is perl5-5.32.0

Thanks

My issue appears to have been caused by building with WITHOUT_LOCALES=YES. Removing that makes perl happy again. Sort of odd that nothing else cared.

Maybe we should either (1) install the C.UTF-8 locale unconditionally, even when WITHOUT_LOCALES=YES, or (2) set LANG=C when WITHOUT_LOCALES=YES. Option 2 would better honor the WITHOUT_LOCALES setting, but I'm not sure how to implement it. Maybe login needs runtime validation of the locale, with a fallback to C.

Maybe we should either (1) install the C.UTF-8 locale unconditionally, even when WITHOUT_LOCALES=YES, or (2) set LANG=C when WITHOUT_LOCALES=YES. Option 2 would better honor the WITHOUT_LOCALES setting, but I'm not sure how to implement it. Maybe login needs runtime validation of the locale, with a fallback to C.

I think the former is preferable. UTF-8 really isn't a locale. It's fundamentally different than all the other locales in that it's universal...