From: Mike Gran <spk121@yahoo.com>
To: guile-devel@gnu.org
Subject: Re: Unicode, ports and encoding
Date: Tue, 17 Feb 2009 15:45:32 -0800 (PST) [thread overview]
Message-ID: <559772.471.qm@web37903.mail.mud.yahoo.com> (raw)
In-Reply-To: 87ocx0hgpv.fsf@gnu.org
> From: Ludovic Courtès <ludo@gnu.org>
>> Mike Gran writes:
> > This implies that a source code file should have syntax to
> > indicate its own encoding, if it is not ASCII. Something akin to
> > the line in HTML files.
>
> One could imagine special treatment of, say, the first 10 lines of a
> file, with the ability to recognize Emacs file variables like
> "-*- coding: utf-8 -*-" and to change the current port transcoder
> accordingly, something like that.
Yeah. Something like that.
> IIRC, the first step you suggested was the implementation of wide
> string/char types. Did you also work on this?
Sort of.
I thought I could start there, but, it isn't easy. There is a lot that could
be broken by modifying string processing. So I tried writing some tests
first so I can check my work as I go along. But the tests have to be
non-ASCII, so they need to be converted when they are read in.
It gets a little bit circular using scm_from_locale_string to convert
non-ASCII strings in the test source, and then having the test check
the behavior of scm_from_locale_string.
So, now I think a better route is to make some type of simplified
transcoded port system available to ports so that non-ASCII
tests are read in correctly. From there, one can work up toward wide
strings and chars while checking work along the way.
Thanks,
Mike Gran
next prev parent reply other threads:[~2009-02-17 23:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 23:51 Unicode, ports and encoding Mike Gran
2009-02-17 21:54 ` Ludovic Courtès
2009-02-17 23:45 ` Mike Gran [this message]
2009-02-18 8:48 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559772.471.qm@web37903.mail.mud.yahoo.com \
--to=spk121@yahoo.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).