Control: tags -1 + confirmed upstream

Hello Vladimir Kudrya

Thanks for your bug report and sorry for my late followup.

On Mon, Jun 06, 2016 at 09:47:31PM +0300, Vladimir Kudrya wrote:
> Package: bsdutils
> Version: 1:2.28-5
> Severity: normal
> 
> Dear Maintainer, wall and write are not able to handle UTF-8 characters:
> 
> Sending:
>       $ echo 'test тест' | write user
>       $ echo 'test тест' | wall
[...]

I've tested these commands and got the same output as you did.

I also tested with utf-8 characters from my own locale:

        $ echo 'foo åäö bar' | write user
        $ echo 'foo åäö bar' | wall

For the wall case the message appeared as expected:

        Broadcast message from user@machine (pts/2) (Sun Nov  6 09:05:56 2016):

        foo åäö bar

But the write message appeared as:

        Message from user@machine on pts/2 at 09:05 ...
        foo M-CM-%M-CM-$M-CM-6 bar
        EOF

My conclusions are:
- wall is working as intended. The reason you sometimes
  see backslash-escaped ascii codes is that your locale (on the
  receiving side) does not consider those characters as "printable
  characters".
- write is likely not working properly with utf-8 characters.

The problem in write is likely caused in the "write_line" function
which writes the output byte-by-byte via fputc(_careful) which
then breaks multi-byte characters.


Regards,
Andreas Henriksson

Reply via email to