[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encodings.

This page is part of the web mail archives of SRFI 52 from before July 7th, 2015. The new archives for SRFI 52 contain all messages, not just those from before July 7th, 2015.

Bradd wrote:
>> I strongly disagree. Compilers have traditionally required all source
>> input to have a particular encoding, usually the system's "native"
>> character encoding, and it works well. ...

Paul Schlie wrote:
> - Yup "native", that¹s why they do it.

And also why I don't insist that Schemes use Unicode universally
(indeed, I've argued against it).

>> Huh? I don't recall insisting that compilers *must* recognize only a
>> single source encoding. Indeed, I've suggested ways to portably
>> specify the input encoding in source code (in XML style). However, I
>> also think the traditional "only recognize one source encoding"
>> compilers are also fine. In other words, flexible source encoding is
>> a desirable but optional feature.

> - "portably specify the input encoding in source code (in XML style)"?
>   really, I'm not aware of any broadly accepted file formats which
>   specify their contents in "XML" or any other style for that matter;

Well, there's XML! Dunno if you're familiar with it; it's a very popular
subset of SGML. One of its features is the ability to include an
"encoding" switch. The basic idea is that you can write XML in any of
several ASCII- or UTF-compatible encodings in a way that makes it easy
for XML processors to figure out which one it is. In theory, you could
use it for any ASCII-compatible encoding. It seems like a promising
technique for portable Scheme input; the XML syntax is very similar to

>   ... would be nice, but don't see how one count on it.

XML is already a popular (meta-)format, and I think it's a very good
prior-art model for Scheme encoding. The XML "encoding switch" won't
work for all native encodings -- might not cope with EBCDIC well, for
example -- but it's a neat idea.

>> No. But it sounds like you *think* I do. Again, it sounds like you have
>> an axe to grind and are reading too much into my words.

> - you're probably correct that I'm reading too much into your words, but
>   shy of any universally accepted tagged external data/file format ....

That's why I recommended XML as an example to follow. It's probably the
closest thing to a universally-accepted, multiple-encoding-friendly
format there is, and it even uses a syntax vaguely similar to Scheme!

>> I have no idea where you got this impression.

> - I misspoke, likely getting too late on my end, I apologize.

Apology accepted!
Bradd W. Szonye