diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2007-09-25 16:28:25 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2007-09-25 16:28:25 +0000 |
commit | 82182aeb9eacb3a6e10e34b34b46ef63222ecd7d (patch) | |
tree | ebefea57dc236043dd68eb4322d68c22855308d2 | |
parent | 7d6e21ef0617a6c6ece314641fb431e5a84c44b0 (diff) | |
download | mana-client-82182aeb9eacb3a6e10e34b34b46ef63222ecd7d.tar.gz mana-client-82182aeb9eacb3a6e10e34b34b46ef63222ecd7d.tar.bz2 mana-client-82182aeb9eacb3a6e10e34b34b46ef63222ecd7d.tar.xz mana-client-82182aeb9eacb3a6e10e34b34b46ef63222ecd7d.zip |
Fix wrapping of UTF-8 multi-byte characters.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/gui/browserbox.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2007-09-25 Björn Steinbrink <B.Steinbrink@gmx.de> + + * src/gui/browserbox.cpp: Fix wrapping of UTF-8 multi-byte characters. + 2007-09-25 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/inventory.h, src/inventory.cpp: Added some const qualifiers. diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index 18853221..262d9c31 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -386,7 +386,10 @@ BrowserBox::draw(gcn::Graphics *graphics) continue; } - end--; + // Skip to the start of the current character + while ((row[end] & 192) == 128) + end--; + end--; // And then to the last byte of the previous one part = row.substr(start, end - start + 1); } while ((x + font->getWidth(part.c_str()) + 10) > getWidth()); |