Package: xpdf
Version: 3.02-21
Severity: minor
Tags: patch

Dear Maintainer,
*** Please consider answering these questions, where appropiate ***

   * What led up to the situation?
Running xpdf on any file with a non-ascii filename, and
a utf-8 locale.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
xpdf erroneously assumed the name was in iso8859-1/latin1,
and mangled the utf8 filename
   * What outcome did you expect instead?
I expected to see the proper filename in the title, instead
of a mess of off characters.

*** End of the template - remove these lines ***

I run a system with a utf-8 locale, and LANG is set up
accordingly. Most programs deal with this. My language (Norwegian)
uses some non-ascii letters that utf-8 represent. It is therefore
natural to use such letters in filenames.

xpdf display filenames in the window titlebar, but gets them
wrong even though the locale is set up correctly.

rxvt can display such titles, no problems there.

The ideal solution is to have xpdf do this right.
I don't know if it is possible to detect the encoding
of a filename. But it is reasonable to assume that
filenames (and command-line text) is in the same
encoding as the X display uses. In such cases, filenames and
parameters can pass through with NO conversion - and just work.
That is actually less work for xpdf, than the wrong conversion
that is done now. It will also work well when eventually
unicode replace all other encodings.


A simpler quick fix that can be put in the xpdf script,
which uses uniconv on the title text:

title=`echo $title|uniconv -encode iso-8859-1`

This goes on the line before $cmd is executed.
With this, the title becomes readable and correct
on my machine. Unfortunately, it adds a dependency
on uniconv, and may not do the right thing for
people using other encodings.

It works for me though.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable'), (800, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=nb_NO.UTF-8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xpdf depends on:
ii  lesstif2      1:0.95.2-1
ii  libc6         2.13-21
ii  libgcc1       1:4.6.1-4
ii  libpoppler13  0.16.7-2+b1
ii  libstdc++6    4.6.1-4
ii  libx11-6      2:1.4.4-2
ii  libxt6        1:1.1.1-2

Versions of packages xpdf recommends:
ii  gsfonts-x11    0.22
ii  poppler-data   0.4.5-2
ii  poppler-utils  0.16.7-2+b1

xpdf suggests no packages.

-- debconf-show failed



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to