This way you'd need to flag a filename as needing encoding conversion for GTK but pass the raw version to PHP to actually do anything with it (n.b. non-iso88059-1 filenames have a history of being problematic under PHP/win32 anyway).
Isn't there any way to do this internally? i.e. automatically pass the raw, unconverted string to fopen() and friends? (e.g. by caching it, or by converting it back to the codepage version?)
No.
Hm. I think my instinct would be to force an explicit conversion for display purposes only and make it the user's problem. Otherwise they'll need to call the thing twice anyway.
I looked at Christian's patch now (sorry Chris but because I'm lazy and all your list messages come through as attachments I usually wait until someone's answered you before I start to read them!) and think the default should be 0 if it's going to be applied at all. Having it as 1 will lend a 'wtf' factor when the PHP file functions suddenly stop working; having gobbledegook display in a widget is more likely to make people realize it's a GTK+ issue and look at the manual.
I'd think it's safe to assume that the codepage setting in the .ini reflects what is used by the system, is this a wrong assumption?
Yes.
Mmkay, I realized after I posted why that might be the case.