Public bug reported:

Binary package hint: cowsay

Ubuntu 9.04
cowsay 3.03

When piping text containing multibyte-characters to cowsay (echo "äöü" |
cowsay), cowsay calculates line length based on the char* size, not the
UTF-8-string size, resulting in this:

$ echo "ää" | cowsay
 ______
< ää >
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
$ echo "aa" | cowsay
 ____
< aa >
 ----
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Note that the top bubble's size is off by 2 characters.

The length of lines must be determined using UTF-8 functions, not basic
array functions to determine the screen real estate used.

** Affects: cowsay (Ubuntu)
     Importance: Undecided
         Status: New

-- 
cowsay miscalculates length of multibyte-UTF-8-characters
https://bugs.launchpad.net/bugs/393212
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to