On Wed, 06 Apr 2005 12:29:53 -0700, Thomas F. Burdick wrote:
> R. Mattes writes:
> > On Wed, 06 Apr 2005 19:54:05 +0100, Christophe Rhodes wrote:
> > > "R. Mattes" <rm@...> writes
> > >> Hmm, maybe last night was way too short for me, but where in your code
> > >> would the actual conversion from UTF-8 to ISO-8859-1 happen? doesn't
> > >> (char-code char) return the character code of char in unicode?
> > >
> > > Well, yes, but the Unicode people were clever, in that the first 256
> > > code points in Unicode encode the same characters as the 256 code
> > > points of ISO-8859-1. UTF-8 is a different encoding, and never enters
> > > the picture at all.
> > Ok, i was afraid of that anwer - i think i'd prefer a more generic
> > solution where i have control over the output encoding (might be
> > ISO-8859-9 or some sort of MS-Windows code page. None of the web folks
> > was able to tell ....).
> Well, in that case, when you do find the encoding you need, make a
> string listing the characters in order, and use
> (find char +ms-windows-page-blah+)
> instead of (code-char char). Or make an array such that you can do
> (aref +ms-code-page-blah+ (char-code char))
Yes , of course - coming back to my original question then: since
input/output en/recoding seems to be a rather generic task (and one that's
hunt us for the next several years), does SBCL provide such functionality?
I've no problem writing my own character recoders but it wuold hurt since
it's all there, in octets.lisp - just not public :-/
So, maybe a humble request: can we get the functionality of octets.lisp
(and maybe some syntactic sugar) into a public API? Also, how can we
humble web/xml/desktop application programmers get a "stringish" datatype
that can be fed to format/write-string et al. (unfortunately one can't
subtype build-in classes).
> ------------------------------------------------------- SF email is
> sponsored by - The IT Product Guide Read honest & candid reviews on
> hundreds of IT Products from real users. Discover which products truly
> live up to the hype. Start reading now.