develooper Front page | perl.perl5.porters | Postings from October 2011

Re: [perl #95160] Unicode readdir bugs

Thread Previous | Thread Next
From:
ilmari
Date:
October 24, 2011 13:53
Subject:
Re: [perl #95160] Unicode readdir bugs
Message ID:
d8jsjmidsc4.fsf@knuth.ping.uio.no
Eric Brine <ikegami@adaelis.com> writes:

> On Mon, Oct 24, 2011 at 4:12 PM, Leon Timmermans <fawaka@gmail.com> wrote:
>
>> On Mon, Oct 24, 2011 at 10:07 PM, Eric Brine <ikegami@adaelis.com> wrote:
>> > Are you saying that non-Windows system can't tell you which encoding it
>> is
>> > using?
>>
>> Most unices (pretty much all of them except OS X) do not have an
>> inherent encoding at all. Filenames are blobs.
>>
>
> Then how come I can read the file names in file selection dialogs on this
> Debian box?

Because the toolkit assumes an encoding, usually UTF-8.  See
<http://www.gtk.org/api/2.6/glib/glib-Character-Set-Conversion.html#g-get-filename-charsets>
for how GTK+ determines it.

-- 
ilmari
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About