]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debrecords.cc
In the C locale, let's avoid any crazy transforms.
[apt.git] / apt-pkg / deb / debrecords.cc
index e7025d9111d280488be3079a4dbd475b15bdef1e..696c55e6a12497bcd8ee838a77355e7132565fe3 100644 (file)
@@ -35,7 +35,7 @@ using std::string;
 // RecordParser::debRecordParser - Constructor                         /*{{{*/
 debRecordParser::debRecordParser(string FileName,pkgCache &Cache) :
    debRecordParserBase(), d(NULL), File(FileName, FileFd::ReadOnly, FileFd::Extension),
-   Tags(&File, std::max(Cache.Head().MaxVerFileSize, Cache.Head().MaxDescFileSize) + 200)
+   Tags(&File)
 {
 }
                                                                        /*}}}*/
@@ -162,7 +162,7 @@ string debRecordParserBase::LongDesc(std::string const &lang)
    }
 
    char const * const codeset = nl_langinfo(CODESET);
-   if (strcmp(codeset,"UTF-8") != 0) {
+   if (strcmp(codeset,"US-ASCII") != 0 && strcmp(codeset,"UTF-8") != 0) {
       string dest;
       UTF8ToCodeset(codeset, orig, &dest);
       return dest;
@@ -232,7 +232,7 @@ bool debDebFileRecordParser::LoadContent()
    content << "\n\n";
 
    controlContent = content.str();
-   if (Section.Scan(controlContent.c_str(), controlContent.length()) == false)
+   if (Section.Scan(controlContent.c_str(), controlContent.length(), false) == false)
       return _error->Error(_("Unable to parse package file %s (%d)"), debFileName.c_str(), 3);
    return true;
 }