[pacman-dev] [Bug] using strlen with utf8

Dan McGee dpmcgee at gmail.com
Wed Feb 14 10:55:58 EST 2007


On 2/14/07, Pierre Schmitz <pierre at archlinux.de> wrote:
> Hi,
>
> it seems as if the function strlen only counts the number of bytes within a
> given string and not the number of characters. In case of utf8 a character
> can have a length of one or two bytes.
>
> The attached screenshot show that in trans.c:337 the length is calculated
> wrong (because he counts the ü twice). When replacing ü with ue everything is
> right.

Good catch. Just made a CVS commit that should hopefully fix this
issue. Let me know if you see it pop up anywhere else, the commit I
made should fix all instances of it happening on the progress bars.

-Dan


More information about the pacman-dev mailing list