Page MenuHomeFreeBSD

PR241491: bin/ps: use locale-based string specifiers
ClosedPublic

Authored by yuripv on Oct 26 2019, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 15 2024, 5:23 AM
Unknown Object (File)
Oct 19 2024, 5:30 AM
Unknown Object (File)
Oct 4 2024, 5:02 PM
Unknown Object (File)
Oct 4 2024, 8:21 AM
Unknown Object (File)
Oct 4 2024, 5:17 AM
Unknown Object (File)
Oct 1 2024, 11:38 PM
Unknown Object (File)
Oct 1 2024, 11:00 PM
Unknown Object (File)
Oct 1 2024, 9:07 PM
Subscribers

Details

Summary

Use %hs instead of %s in bin/ps for it to correctly output locale specific date/time (at least).

Test Plan

Compare output of LC_ALL=uk_UA.UTF-8 ps -o lstart and LC_ALL=uk_UA.KOI8-U ps -o lstart | iconv -f koi8-u. Also reproducer from the PR.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks great! Thanks....

This revision is now accepted and ready to land.Oct 29 2019, 12:12 AM
This revision was automatically updated to reflect the committed changes.

The "%hs" bits look good, but why do you add the call to xo_no_setlocale()?

Thanks,
Phil

In D22160#555029, @phil wrote:

The "%hs" bits look good, but why do you add the call to xo_no_setlocale()?

Thanks,
Phil

Oh, I didn't notice it's already fixed in libxo, will remove.

In D22160#555029, @phil wrote:

The "%hs" bits look good, but why do you add the call to xo_no_setlocale()?

Thanks,
Phil

Removed in followup commit.