Thanks for the details, finally I can reproduce this now. When adding three unicode related lines into 'ts' it _seems_ to me to be fixed, but my perl experience is quite degraded and I'd like to get some feedback from volunteer testers before forwarding the patch to upstream.
Francois, might you be able to patch your ts with the attached patch and re-check? As August has gone, I used echo test | faketime "2022-08-01" ./ts for testing with your specified locale settings. Kind regards, Nicolas On Sat, 6 Aug 2022 10:37:22 -0700 Francois Marier wrote: > I can also reproduce this problem with `ts` while `date` works fine: > > $ date | ts > ao� 06 10:33:36 sam 06 aoû 2022 10:33:36 PDT > > $ date > sam 06 aoû 2022 10:35:39 PDT > > $ echo test | ts > ao� 06 10:36:04 test > > This is what my locale is set to: > > $ locale > LANG=fr_CA.utf8 > LANGUAGE= > LC_CTYPE="fr_CA.utf8" > LC_NUMERIC="fr_CA.utf8" > LC_TIME="fr_CA.utf8" > LC_COLLATE="fr_CA.utf8" > LC_MONETARY="fr_CA.utf8" > LC_MESSAGES="fr_CA.utf8" > LC_PAPER="fr_CA.utf8" > LC_NAME="fr_CA.utf8" > LC_ADDRESS="fr_CA.utf8" > LC_TELEPHONE="fr_CA.utf8" > LC_MEASUREMENT="fr_CA.utf8" > LC_IDENTIFICATION="fr_CA.utf8" > LC_ALL= > > $ cat /etc/locale.gen | grep -v '^#' > en_CA.UTF-8 UTF-8 > en_NZ.UTF-8 UTF-8 > fr_CA.UTF-8 UTF-8 > > Let me know if there's anything else I can provide to help reproduce the > problem. > > Francois > > -- > https://fmarier.org/ -- epost|xmpp: nico...@fjasle.eu irc://oftc.net/nsc ↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f -- frykten for herren er opphav til kunnskap --
diff --git a/ts b/ts index af23cf7..fbd5b1a 100755 --- a/ts +++ b/ts @@ -54,6 +54,11 @@ use strict; use POSIX q{strftime}; no warnings 'utf8'; +# Ensure that text read or printed are converted from/to UTF-8. +binmode STDIN, ':utf8'; +binmode STDOUT, ':utf8'; +binmode STDERR, ':utf8'; + $|=1; my $rel=0;