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: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] Interesting bug in French locale :-)
Date: Fri, 09 Sep 2005 13:11:30 +0200 (CEST)

In message <address@hidden> on Fri, 09 Sep 2005 08:59:27 +0200, "Benoît Dejean" 
<address@hidden> said:

benoit> it's
benoit> 
benoit> const char * gettext(const char *);
benoit> 
benoit> and i don't think you'll find anything interesting in its internal.
benoit> NB : With utf-8 str.size() >= length(utf8(str));

I don't understand what you want to say with that last line...

benoit>         Btw, the code assumes that each ticker as a unique
benoit> name (std::map<std::string,ticker *> tickers;). With
benoit> wrong/incomplete translations or charset issues (here you get
benoit> "octets ?" twice), I() is broken. It seems harmful to use i18n
benoit> strings that way. The good news is that tickers std::set's
benoit> features are used only with I() to ensure that the ticker has
benoit> been registred (or has not already been).
benoit>         So just switch to std::vector<ticker*> and check for
benoit> value, not value->name. The map was a hack because somebody
benoit> was too lazy too write an operator< / == for ticker. Easy fix
benoit> i think.

It's easy to fix that way, but a conceptual error.  What does it mean
to the user if two tickers have the exact same name?  As soon as you
get two or more tickers with the same name, you could as well throw
tickers away entirely since they'd become irrelevant at that point.

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.

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

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