[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kio] [Bug 266141] KTar class have broken UTF-8 support for multibyte characters (longlink)
From:       Ibragimov Rinat <bugzilla_noreply () kde ! org>
Date:       2018-08-07 11:31:18
Message-ID: bug-266141-17878-fvXj3wro2J () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=266141

Ibragimov Rinat <ibragimovrinat@mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibragimovrinat@mail.ru

--- Comment #2 from Ibragimov Rinat <ibragimovrinat@mail.ru> ---
(In reply to Julian Schraner from comment #1)
> Hey Ibragimov, does this issue still exist for you? The program you provided
> was written for Qt 4, which is no longer supported. If the problem does
> still exist, we'd love to merge your patch assuming that the patch does
> solve the bug.

Well, back then I also reported the issue to Debian bug tracker:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612675. The patch I created
was not complete, but fortunately it was updated and subsequently included into
the package patchlist. It's still included in kde4libs
(https://salsa.debian.org/qt-kde-team/kde/kde4libs/blob/master/debian/patches/ktar_longlink_length_in_bytes.diff).
 I then moved away from the software that used KTar, and then forgot about the
issue completely.

Unfortunately, the issue is still there, but now it's in the KF5Archive
component. As for the repro, here is the code:

-----------------------
// g++ -fPIC -o qw qw.cc `pkg-config --cflags --libs Qt5Core`
-I/usr/include/KF5/KArchive -lKF5Archive

#include <ktar.h>
#include <stdio.h>

int main() {

    KTar archive(QString("testfile.tar"), "application/x-tar");
    QString filename=QString::fromUtf8(" аз два три четыре пять, \
вышел зайчик погу.txt");
    archive.open(QIODevice::WriteOnly);
    archive.prepareWriting(filename, QString("user"), QString("group"), 0);
    archive.finishWriting(0);
    archive.close();
    return 0;
}

-----------------------

As before, after program creates "testfile.tar", "tar tf testfile.tar" fails:

$ tar tf testfile.tar 
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors


I don't know if the patch can be applied as is to the current code. Haven't
tried that yet.

-- 
You are receiving this mail because:
You are watching all bug changes.=


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic