monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Interesting bug in French locale :-)


From: Benoît Dejean
Subject: Re: [Monotone-devel] Interesting bug in French locale :-)
Date: Fri, 09 Sep 2005 18:24:36 +0200

Le vendredi 09 septembre 2005 à 13:11 +0200, Richard Levitte - VMS
Whacker a écrit :
> benoit> NB : With utf-8 str.size() >= length(utf8(str));
> 
> I don't understand what you want to say with that last line...

std::string is just about bytes, utf8 is about chars (maybe multibyte).

> So I think we should look into fixing the UTF-8 bugs, if it's at all
> possible for us to affect what happens at that level.
> 

This is not a bug. No code should trust i18n strings : they may be
broken (charset error), use bad format (very dangerous), etc. Here the
ticker name should only be a UI string. We should store two string : one
for the ticker role, one for its display.

An easy fix would be to do lazy translation (pseudo code) :

Ticker(N_("bytes in")); // mark string for i18n but don't translate now
ticker->name == "bytes in"; // We trust that string and use it as a key

Ticker::display()
{
   print(_(this->name)); // translate now
}

Fixed :)

-- 
Je cherche un emploi de développeur / admin sys&réseau sous GNU/Linux
http://wws.fr.lolix.org/search/cv/cv.php3?id=7101
http://dejean.benoit.free.fr/CV.pdf
%%
JID: address@hidden
GNOME http://www.gnomefr.org/
LibGTop http://directory.fsf.org/libgtop.html

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]