Page MenuHomeFreeBSD

Switch C.UTF-8 as the default locales
ClosedPublic

Authored by bapt on Oct 27 2020, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 11:36 PM
Unknown Object (File)
Wed, Apr 10, 6:11 PM
Unknown Object (File)
Sat, Apr 6, 11:35 AM
Unknown Object (File)
Feb 18 2024, 8:21 AM
Unknown Object (File)
Feb 16 2024, 1:18 AM
Unknown Object (File)
Feb 11 2024, 9:05 PM
Unknown Object (File)
Feb 11 2024, 4:18 AM
Unknown Object (File)
Jan 29 2024, 12:28 AM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34417
Build 31521: arc lint + arc unit

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...

Ahh... So this is why my locale setting is no longer passed through between boxes.

A shame login.conf doesn't have a "?=" type option setting so that pre-defined settings (in this case, via ssh/sshd) aren't clobbered!