Do you know where your variables are? | |
PerlMonks |
Re^2: Using literal Japanese filenames in legacy CP932 encoding with system(), etc.by almut (Canon) |
on Oct 25, 2006 at 15:47 UTC ( [id://580610]=note: print w/replies, xml ) | Need Help?? |
...it seemed to me that the way to go there was to have a module that provides replacements for the built-in functions that take and return file names. Thanks for your response, and for the pointer to the archived thread. All in all, it makes me feel reassured I'm not entirely on the wrong track (actually, I was hoping I might be ;) and that there in fact is an easier solution). No big issue though, I'll just get on with implementing the wrappers. Any tips from more experienced monks on what subtle pitfalls to avoid along these lines? I figure I should be on the safe side when simply limiting my encoding conversions to scalar arguments (specifically thinking of built-ins with multiple prototypes, like open()...).
Right. I have to admit I haven't really looked into this yet, so I'll do some more RTFM and/or take a peek into the sources. If anyone has any promising hints, I'd of course appreciate it. A simple compile-time switch would be absolutely OK (I'll be building / providing their Perl packages anyway). But I'd rather not do any further patching -- just afraid that too many hacks are going to be a nightmare to maintain in the long run... (which might get them into a similar situation to what they're in now, in another five to ten years).
I already have the stub code in place for these filehandle related things. On the Perl side everything is working beautifully -- thanks to the nice and clean design of Perl IO layers (Kudos to everyone who's been working on this, BTW). What's giving me more of a headache here is that it seems I have to switch between various encodings, depending on what specific version of Windows I'm on, etc. The site is rather heterogeneous, and I guess I don't have to tell you that "no Windows is like any other" -- at least when you get down to the nitty-gritties (e.g. one dumps the registry in ucs-2le, the other in legacy encoding, ...) Moreover, I'm no Windows expert -- just dabbling in largely unknown territory :) Anyway, thanks again,
In Section
Seekers of Perl Wisdom
|
|