[REBOL] Re: Rebol & XML encoding
From: al::bri::xtra::co::nz at: 6-Jul-2002 11:23
bryan wrote:
> Has anyone confirmed that Rebol won't write Unicode?
I don't know about writing, but it's definite that Rebol can't read Unicode
scripts. I wrote a Hello World program in Windows XP notepad and
successively saved it with each of the four encodings:
ANSI
Unicode
Unicode big endian
UTF-8
and Rebol only understood the first encoding. For example:
>> do %Test.r
Script: "Untitled" (none)
Hello World!
>> do %Test.r
** Syntax Error: Script is missing a REBOL header
** Near: do %Test.r
>> do %Test.r
** Syntax Error: Script is missing a REBOL header
** Near: do %Test.r
>> do %Test.r
** Syntax Error: Script is missing a REBOL header
** Near: do %Test.r
And then back to the beginning again:
>> do %Test.r
Script: "Untitled" (none)
Hello World!
> You might at any rate consider writing ISO-8859-1 for the encoding as
windows-1252 is windows specific, and ISO is cross-platform.
I've now done that. Thanks for the suggestion!
> when you replace "-" with a space what did you replace it in, I mean where
you using a text editor to look at output from your program, cause then it
can be that the text editor is saving as US-ASCII instead of Unicode.
I've used Windows XP Notepad (saving as ANSI) and Metapad.
> Can you post the xml?
I've got the latest XHTML on my site here:
http://valley.150m.com/Rebol/Telephone.html
http://valley.150m.com/Rebol/Telephone with blanks.html
The plain .txt (which are used by Rebol to generate the above) are at:
http://valley.150m.com/Rebol/Telephone.txt
http://valley.150m.com/Rebol/Telephone with blanks.txt
Andrew Martin
ICQ: 26227169 http://valley.150m.com/