]> git.donarmstrong.com Git - lilypond.git/commit
Fix error message output containing wide chars
authorPatrick McCarty <pnorcks@gmail.com>
Thu, 22 Oct 2009 10:01:09 +0000 (03:01 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Mon, 26 Oct 2009 16:39:15 +0000 (09:39 -0700)
commita6bbe2fa3fceea9a153dad35294679ae54868671
tree235b43a4d9189b50a960f5144951055df20ae5de
parent3d58116c9de867d3a7c92c4b443324700ecd9c95
Fix error message output containing wide chars

Before this commit, error message output containing multibyte characters
would be displayed incorrectly for en_US.ISO-88591, en_US.UTF-8, and
other standard locales.

The characters were being split because the character count only
increased by one at the end of a loop iteration.  It is necessary to
account for characters that are 2, 3, or 4 bytes wide, and this commit
(mostly) fixes that problem.

Note that this is a temporary workaround.  Eventually, we should use
routines that are not locale-dependent, since the only information we
need is the size of each UTF-8 character.
lily/source-file.cc