On Apr 10, 2005, at 12:20am, Joseph Alotta wrote:

The input files have to be saved in UTF-8 -- not a problem since TextEdit (I'm on Mac OS X 10.3) can save in any of the many encodings supported by the system. Then the files must be read in with just a normal open() with no special encoding parameter. Then the strange part. Once read in, I must encode the file contents as 'latin1' before submitting the article (and obviously, I have to do this to the title *before* escaping it). If I don't do the latin1 encoding, it doesn't work, which I don't understand, since I'm submitting to a UTF-8 server application, and which might mean I've got something else not quite right.

Wow. This sure sounds like alchemy. Are you sure this is programming?

I think it may have something to do with the BOM not being correctly set by TextEdit, although, I haven't had the opportunity to conclusively determine this. (I've had some issues in other scripts related to whether I need to chop() once or twice to remove newline characters.)


In the interim, I've stopped sacrificing chickens before each run.


John Blumel



Reply via email to