In message <[EMAIL PROTECTED]> on Fri, 09 Sep 2005 08:59:27 +0200, "Benoît Dejean" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 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 _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
