<<< Date Index >>>     <<< Thread Index >>>

mutt_FormatString() not multibyte-aware



Hi,

mutt_FormatString() isn't multibyte-aware in several ways.

First, it doesn't support padding with multibyte-chars due to lines like 'ch = *src++' etc.

Second, padding doesn't work if the string contains multibyte characters since the pad length seems to be calculated by going with bytes and not character cells of the result.

I would like to fix it but don't know how since one of the mbyte functions failed for we in always returning 1 for the width. Maybe we could also convert to utf-8 first because it's so trivial to test for continuations (as mutt IIRC does in other places already).

Should I file a bug report for this to have a discussion in the BTS or is a real fix easy enough so I don't have to?

  bye, Rocco
--
:wq!