Summary: | wrong encoding on command line arguments | ||
---|---|---|---|
Product: | [Unmaintained] kghostview | Reporter: | Choe Hwanjin <hjchoe> |
Component: | general | Assignee: | Wilco Greven <greven> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Choe Hwanjin
2003-03-20 04:30:27 UTC
Agreed. KCmdLineArgs::args(int) returns const char*. One should ALWAYS use one of QString's encoding functions on those, not allow default conversion. This is partially my fault. It has been fixed in HEAD, but it needs backporting which I will do right away. luis pedro coelho I am committing to BRANCH the same main.cpp as HEAD, as I think it will fix this bug and it is simpler code. I was able to reproduce it on BRANCH using UTF-8 encoded dir-names and after this patch it seems to work. Thanks for reporting the bug, luis pedro coelho Subject: KDE_3_1_BRANCH: kdegraphics/kghostview CVS commit by luis_pedro: Backport of right argument parsing. Also backports new address of FSF. CCMAIL: 56169-done@bugs.kde.org M +3 -7 main.cpp 1.54.2.2 --- kdegraphics/kghostview/main.cpp #1.54.2.1:1.54.2.2 @@ -14,5 +14,5 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ @@ -49,10 +49,5 @@ int main( int argc, char** argv ) shell->openStdin(); } else { - QFileInfo fi = QDir::current().absPath() + - QDir::separator() + - args->arg(0); - if (fi.exists()) - shell->openURL( KURL::fromPathOrURL( fi.absFilePath() ) ); - else shell->openURL( KURL::fromPathOrURL( args->arg(0) )); + shell->openURL( args->url(0) ); } } |