On Sun, Oct 02, 2005 at 11:07:12AM +0200, Miroslav Kure wrote:
> When displaying package info, the parts of a tree that come from apt
> are not encoded correctly and I can see only question marks '?'
> instead of accented (iso-8859-2) characters. This is broken no matter
> whether I use locale with encoding ISO-8859-2 or UTF-8 (and of course
> appropriate font). Strings comming directly from aptitude itself are
> displayed just fine.
> 
> Aptitude 0.2.15.9 in Sarge does not have this problem -- please see
> the two pictures at http://www.debian.cz/~kurem/shots/ (broken line
> is highlighted).

  For some reason, when I did the UTF-8 conversion, I decided to assume
in those functions that DepType() always returned ASCII -- perhaps I
momentarily forgot that it was localized.  The attached patch should fix
it.

  Daniel
Wed Oct  5 20:06:10 PDT 2005  Daniel Burrows <[EMAIL PROTECTED]>
  * Don't assume that DepType() returns ASCII; instead, expect the native 
multibyte encoding.
  (Closes: #331199)
diff -rN -u old-head/src/dep_item.cc new-head/src/dep_item.cc
--- old-head/src/dep_item.cc    2005-10-05 20:07:23.223303792 -0700
+++ new-head/src/dep_item.cc    2005-10-05 19:43:39.000000000 -0700
@@ -260,7 +260,7 @@
       tree_map::iterator found=subtrees.find(D.DepType());
       if(found==subtrees.end())
        {
-         subtree=new pkg_subtree(transcode(D.DepType(), "ASCII"),
+         subtree=new pkg_subtree(transcode(D.DepType()),
                                  true);
          subtrees[D.DepType()]=subtree;
          tree->add_child(subtree);
@@ -290,8 +290,7 @@
                tree_map::iterator found=subtrees.find(D.DepType());
                if(found==subtrees.end())
                  {
-                   subtree=new pkg_subtree(transcode(D.DepType(),
-                                                     "ASCII"),
+                   subtree=new pkg_subtree(transcode(D.DepType()),
                                            true);
                    subtrees[D.DepType()]=subtree;
                    tree->add_child(subtree);

Reply via email to