Re: string port encodings

2013-08-06 Thread Mark H Weaver
Andy Wingo writes: > Again, I think the default encoding for a string port should be one that > can represent all characters, and we should change this in master. Long ago on IRC, we agreed to fix this in master, and I just did so. Mark

Re: string port encodings

2013-01-31 Thread Mark H Weaver
Andy Wingo writes: > Here is where I think this code goes wrong: its correctness appears to > depend on the default port encoding. That is totally bogus. It was > written long before we had such a thing. > > Again, I think the default encoding for a string port should be one that > can represent

Re: string port encodings

2013-01-31 Thread Andy Wingo
Hi, On Wed 16 Jan 2013 19:16, Andy Wingo writes: > On Wed 16 Jan 2013 18:37, l...@gnu.org (Ludovic Courtès) writes: > >> I just think [string port encodings] may have to wait until 2.2. > > Oh yes, agreed here. Anyway let's let it simmer for a while. Another > two

Re: string port encodings

2013-01-16 Thread Andy Wingo
On Wed 16 Jan 2013 18:37, l...@gnu.org (Ludovic Courtès) writes: > I just think this may have to wait until 2.2. > > WDYT? Oh yes, agreed here. Anyway let's let it simmer for a while. Another two or three of these threads should be enough to either reaffirm or change the current state of things

Re: string port encodings

2013-01-16 Thread Ludovic Courtès
Andy Wingo skribis: >> Otherwise, %default-port-encoding governs (info "(guile) String Ports"): > > But why? Because %default-port-encoding specifies the default port encoding? :-) I think that was mostly the reason behind . > You mention o

Re: string port encodings

2013-01-16 Thread Andy Wingo
Hi :) On Wed 16 Jan 2013 16:44, l...@gnu.org (Ludovic Courtès) writes: > Andy Wingo skribis: > >> But no, currently the answer is locale-specific. It encodes the string >> according to the current locale, then decodes it from that encoding. If >> your locale can't encode the string, tough luck

Re: string port encodings

2013-01-16 Thread Ludovic Courtès
Hi! Andy Wingo skribis: > But no, currently the answer is locale-specific. It encodes the string > according to the current locale, then decodes it from that encoding. If > your locale can't encode the string, tough luck for you! SRFI-6 uses Unicode-capable ports since ecb48dccbac6b8fdd969f50

Re: string port encodings

2013-01-15 Thread Mike Gran
Hi Andy, > From: Andy Wingo > But no, currently the answer is locale-specific.  It encodes the string > according to the current locale, then decodes it from that encoding.  If > your locale can't encode the string, tough luck for you! > > This is a bit crazy.  Surely the port should be textual?

Re: string port encodings

2013-01-15 Thread Mark H Weaver
Hi Andy, Andy Wingo writes: > Quiz: what does this do? > > (define (f s) > (with-output-to-string (lambda () (display s > > When called with a string, what should it do? Like (f "foo"). > > If you answered, "return the string", that's what I would think it > should do. > > But no, curr

Re: string port encodings

2013-01-15 Thread Alex Shinn
On Tue, Jan 15, 2013 at 11:36 PM, Andy Wingo wrote: > Quiz: what does this do? > > (define (f s) > (with-output-to-string (lambda () (display s > > When called with a string, what should it do? Like (f "foo"). > > If you answered, "return the string", that's what I would think it > sho

string port encodings

2013-01-15 Thread Andy Wingo
Quiz: what does this do? (define (f s) (with-output-to-string (lambda () (display s When called with a string, what should it do? Like (f "foo"). If you answered, "return the string", that's what I would think it should do. But no, currently the answer is locale-specific. It encodes