[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bino-list] Bug: translation of Usage text using UTF-8
From: |
Alexey Osipov |
Subject: |
[Bino-list] Bug: translation of Usage text using UTF-8 |
Date: |
Mon, 18 Apr 2011 01:21:35 +0700 |
Hi, Martin!
In process of making russian translation for bino, I've found a bug,
which makes translated Usage text seem not quite good.
In msg::msg_txt you use 'for' loop to cycle through std::string,
representing a text (the Usage text in particular), and count symbols to
determine the line length. But if text is in UTF-8 (or other multi-byte
encoding), the counting is doing wrong - two-byte character counts for
two characters. So the total allowed length of the string becomes less
than default 80 columns and hence translated string is wrapped to the
next line.
See attached screenshot.
You should use std::wstring or something to count multi-byte characters
as one character.
Alexey.
screenshot1.jpeg
Description: JPEG image
- [Bino-list] Bug: translation of Usage text using UTF-8,
Alexey Osipov <=