(I've been working on the new TypePad connect and profile stuff, so this feels more natural to get back to blogging on TypePad :)
I've restarted my love of hacking RSS feeds and Perl (aka Plagger) and launched my new toy project Remedie the pluggable Media Center application written in Perl and backed by Plagger. I'll talk about it more on that later, but this has already proven its usefulness and addictivity so that I can't live without this.
The one thing I hate to write and see in my code is the code to deal with Win32 though. Based on the recent popularity I picked Moose and Path::Class to represent the local file path in Remedie code, but it just started to hurt me, because Path::Class does special care of Win32 filenames and file paths, like changing directory separater to backslash (\) while Perl itself doesn't have any problem with forward slash even if it's on win32 file systems. charsbar is trying to deal with that by writing another Path::Class compatible class called Path::Extended.
The other problem is Unicode filenames. In most UNIX operating systems like Mac OS X or Linux we just use utf-8 filenames, but on Win32 it's different. They have local code page, which is usually cp932 in Windows running in Japanese environment, and they also have wide filename API to deal with UCS (UTF-16) filenames without encoding/decoding filenames to the local encoding (cpXXX). Unfortunately perl itself can't handle those Unicode filenames natively using its built-in open() functions. You should use Win32API::File to handle them.
As a starter, I wrote Path::Class::Unicode that encodes filenames to the local encoding (cpXXX) when it's opening a file, but eventually we might need IO::Handle compatible proxy that allows you to read and print that is eventually proxied to API calls to Win32API::File.
Recent Comments