Bug#848578: /usr/bin/ts: charset issue with ts and localization

2016-12-22 Thread Nicolas Schier
Dear Yves-Alexis,

> LANG=fr_FR.utf8
> LC_TIME="fr_FR.utf8"
> LC_MESSAGES=en_US.UTF-8
> LC_ALL=
> 
> 
> When running ts, I have:
> 
> echo toto |ts
> d�c. 18 15:57:51 toto

I am trying to reproduce this issue on my system, but I am (yet) not 
able to get it.  Can you please try to help me?

 * I enabled 'fr_FR.UTF-8' and 'en_US.UTF-8' in /etc/locale.gen and ran
   'dpkg-reconfigure -p high locales'.
 * I reset my locale related environment variables in this order:

export LC_ALL= LANG=

   then I start a new terminal with these settings, thus, 'locale' in 
   the new terminal shows 'POSIX' to all LC_* variables. Then I issue

export LC_ALL=
export LANG=fr_FR.utf8
export LC_TIME="fr_FR.utf8"
export LC_MESSAGES=en_US.UTF-8

   and the 'locale' output is almost as expected:

LANG=fr_FR.utf8
LANGUAGE=
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME=fr_FR.utf8
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=

 * Running 'date', it seems to show the behaviour you described:

vendredi 23 décembre 2016, 05:25:47 (UTC+0100)

   but with 'ts' it seems to be correct to me:

$ echo bicycle repair man | ts
déc. 23 05:26:07 bicycle repair man

An interesting point to me: when I am starting from my usual locale 
settings (LANG=de_DE.UTF-8, LC_ALL=nb_NO.UTF.8) and then set the 
specific values as written above, I get the same 'locale' output but

$ date | ts
déc. 23 05:32:11 vendredi 23 décembre 2016, 05:32:11 (UTC+0100)

seems to ok.

So, since 'ts' always shows me the correct output, I am not yet able to 
reproduce your issue; but am confused about 'date' behaving as you 
wrote about 'ts'...

Kind regards,
Nicolas


-- 
gpg key id: 55a0ce7f, epost: nicolas@(fjasle.eu|hjem.rpa.no)
↳ fpr: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
 -- frykten for herren er opphav til kunnskap --


signature.asc
Description: PGP signature


Bug#848578: /usr/bin/ts: charset issue with ts and localization

2016-12-18 Thread Yves-Alexis Perez
Package: moreutils
Version: 0.59-1
Severity: normal
File: /usr/bin/ts

Hi,

it seems that ts has some charset issues. My locales are:

LANG=fr_FR.utf8
LC_TIME="fr_FR.utf8"
LC_MESSAGES=en_US.UTF-8
LC_ALL=


When running ts, I have:

echo toto |ts
d�c. 18 15:57:51 toto

Notice the wrong encoding (should be déc). ts apparently outputs
character 0xe9 instead of 0xef.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (450, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-grsec-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages moreutils depends on:
ii  libc62.24-8
ii  libipc-run-perl  0.94-1
ii  perl 5.24.1~rc4-1

moreutils recommends no packages.

Versions of packages moreutils suggests:
pn  libtime-duration-perl  
ii  libtimedate-perl   2.3000-2

-- no debconf information