# # # patch "ChangeLog" # from [4197ec0785e53d59a0a66583a6782b6bd0d5bd9d] # to [a15d9a31cf06498b3fb28e713762397883cee543] # # patch "ui.cc" # from [88bd082d78f7c8296dac0268ef6114200310207f] # to [79b9eac846cb508b92c172893eb9a77ce77cd5c1] # ============================================================ --- ChangeLog 4197ec0785e53d59a0a66583a6782b6bd0d5bd9d +++ ChangeLog a15d9a31cf06498b3fb28e713762397883cee543 @@ -1,3 +1,9 @@ +2006-02-05 Benoît Dejean + + * ui.cc (tick_write_count::write_ticks): Fixed utf8 handling. + boost::format + locale sucks, it ouputs "1\u+ffff24" for + "%d" % 1024. + 2006-02-02 Emile Snyder * merge.cc (resolve_merge_conflicts): If the merge has non-content ============================================================ --- ui.cc 88bd082d78f7c8296dac0268ef6114200310207f +++ ui.cc 79b9eac846cb508b92c172893eb9a77ce77cd5c1 @@ -142,19 +142,21 @@ else { // xgettext: bytes - count = (F("%d") % tick->ticks).str(); + // boost is fucked up, outputs some weird caracter + // count = (F("%d") % tick->ticks).str(); + count = boost::lexical_cast(tick->ticks); } size_t title_width = display_width(utf8(tick->name)); size_t count_width = display_width(utf8(count)); - size_t max_width = title_width > count_width ? title_width : count_width; + size_t max_width = std::max(title_width, count_width); string name; - name.append(max_width - tick->name.size(), ' '); + name.append(max_width - title_width, ' '); name.append(tick->name); string count2; - count2.append(max_width - count.size(), ' '); + count2.append(max_width - count_width, ' '); count2.append(count); tick_title_strings.push_back(name);