TECH: UTF-8 and schcompile
|From:||Paul Bennett <paul-bennett@...>|
|Date:||Monday, April 24, 2006, 0:20|
Apparently, it ain't as simple as all that.
I tried it with a UTF-8 sch file.
The error was:
Error: The first line should read something like '#!...sch...'
so I erased the UTF-8 BOM at the start of the file.
I also edited the "open" line to:
open (F, '<:utf8', "$file") or error "While trying to read '$file': $!";
since without the BOM, there's no defined way to identify a Unicode file
(absent some external data).
This made it kinda work, though I apparently have syntax errors out the
wazzoo in my sch file. It works on a single-step single-rule file, though,
so that's something.
NOTE to Windows users: Notepad, Wordpad, and every standard Windows tool I
have tried all fail to show the BOM or any sign of its existence. While
this is technically correct behavior, it's not very helpful in this case.
I used Cygwin VIM to "repair" the file, but there's a learning curve
associated with it, and you have to carry out the repair steps at every
How have y'all managed to produce and use UTF-8 sch files in Windows?