July 12th, 2004

Abelian Grape

I want perl to act stupider, demmit.

Apparently the sysadmin must've upgraded our version of perl over the weekend, or early this morning, or something. A bunch of scripts I have for handling data in various encodings (mostly ISO-8859-*, but also a few WinCP things, and one Unicode format), and converting between those encodings, which all used to work just fine, now give weird error messages about invalid UTF-8 characters. And UTF-8 isn't even one of the encodings I'm working with. (I stick to fixed-width UTF-16-LE, both because fixed-widths are convenient, and because it's the Windows native Unicode format, which makes it convenient for viewing on the evil WinXP and Win2k boxen.)

I've tried various "binmode" incantations -- you'd think that applying it to every filehandle in sight ought to be sufficient -- but nothing seems to be working. It even insists that /^\xFF\xFE/ is not a valid regexp, because \xFF\xFE isn't valid UTF-8. Well, no shit, perl; maybe that's because I'm not working in UTF-8, eh? It's a perfectly valid match for the beginning of a UTF-16-LE file.

And I can't find the sysadmin to ask him to roll back the change. And I really need to get some stuff done within the next day or so, and can't do it without either using my existing tools, or rewriting them to deal with whatever change has happened inside perl.

$#@*!

It should not be trying to tell me what encoding I'm working in. It should just treat the file as a byte stream, and leave encoding stuff up to me. Stupid clever language designer, thinking he's cleverer than me. :-P
  • Current Mood
    frustrated frustrated
Kittens

So that's how curiosity killed it.

Hoshi is absolutely convinced that she wants to try a bite of my roommate's five-alarm chili. Personally, I've been eating it for dinner... very slowly... with a lot of rice, and a large glass of milk... and I'm still not convinced I want a bite of it, or at least not plain. Eek!

Anyways, I have been saving her from herself, but she keeps hopping up into my lap and shnuffling at the bowl when I hold it out of her reach.
  • Current Mood
    full full