pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: QT4 file widget doesn't see image with %C3%AD in file name



Jeremy C. Reed wrote:
> I don't know if this is a NetBSD problem, a QT4 problem or an LyX problem.
> (I have latest LyX ready to commit to pkgsrc.)
 
> I noticed an image was not visible in the QT file widget (for inserting 
> graphics into LyX).
 
> The image is:
> http://en.wikipedia.org/wiki/Image:Presidio_La_Bah%C3%ADa.jpg
 
> My xterm shows it as (with two question marks):
 
> Presidio_La_Bah??a.jpg

Do you mean "ls in xterm"? NetBSD's ls suppresses some non-ASCII characters.
You have to use 'ls -w' to override that. That still doesn't mean the
filename as encoded makes any sense with respect to your locale encoding.

> Copying and pasting the name from Mozilla beeps and loses the character:
> Presidio La Baha.jpg
 
> Is this a NetBSD problem that NetBSD should fix? A NetBSD problem that Qt 
> should work around? A QT problem?

The first step would be using UTF-8 as locale encoding. Using en_US.UTF-8 is
the most reasonable default locale today.

Many, maybe most, programs are simply broken in so far that they implicitely
assume every filename can be rendered and/or that the filename encoding matches
the locale encoding. Gtk+ 2.x has specific functions for filenames which
provide a string that can be rendered and another which represents the filename
as used by the filesystem.  However, very few Gtk+ programs use these
correctly, if at all. I'm pretty sure the same applies to QT.

-- 
Christian


Home | Main Index | Thread Index | Old Index