Skip to content

Commit

Permalink
TextViewer now supports wrapping UTF-8 text
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Feb 14, 2014
1 parent 3e596f1 commit cee2547
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Resources/Scripts/Gui/UIControls.as
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,12 @@ namespace spades {
bool charMode = false;
while(startPos < len) {
int nextPos = pos + 1;
if(!charMode) {
if(charMode) {
// skip to the next UTF-8 character boundary
while(nextPos < len && ((text[nextPos] & 0x80) != 0) &&
((text[nextPos] & 0xc0) != 0xc0))
nextPos++;
} else {
while(nextPos < len && text[nextPos] != 0x20)
nextPos++;
}
Expand Down

0 comments on commit cee2547

Please sign in to comment.