[Aptitude-svn-commit] r3442 - in branches/aptitude-0.3/aptitude: . src
Daniel Burrows
dburrows@costa.debian.org
Sat, 25 Jun 2005 21:46:09 +0000
Author: dburrows
Date: Sat Jun 25 21:46:07 2005
New Revision: 3442
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/load_pkgview.cc
Log:
Interpret multibyte sequences in column configuration data.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Jun 25 21:46:07 2005
@@ -1,5 +1,10 @@
2005-06-25 Daniel Burrows <dburrows@debian.org>
+ * src/load_pkgview.cc:
+
+ When parsing column information, transcode it to a wide
+ character set first.
+
* src/Makefile.am, src/pkg_item_with_subtree.cc, src/pkg_item_with_subtree.h:
Transcode the package name to force it into the wide character
Modified: branches/aptitude-0.3/aptitude/src/load_pkgview.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/load_pkgview.cc (original)
+++ branches/aptitude-0.3/aptitude/src/load_pkgview.cc Sat Jun 25 21:46:07 2005
@@ -11,6 +11,7 @@
#include <generic/config_signal.h>
#include <generic/apt.h>
+#include <vscreen/transcode.h>
#include <vscreen/vs_table.h>
#include <apt-pkg/error.h>
@@ -84,7 +85,14 @@
else
colinf=subtree.Find("Columns");
- tmp.columns=parse_columns(colinf,
+ std::wstring wcolinf;
+ if(!transcode(colinf.c_str(), wcolinf))
+ {
+ _error->Error(_("Couldn't parse layout: encoding error in column descriptor"));
+ delete rval;
+ return NULL;
+ }
+ tmp.columns=parse_columns(wcolinf,
pkg_item::pkg_columnizer::parse_column_type,
pkg_item::pkg_columnizer::defaults);
if(!tmp.columns)