<div dir="ltr">Can't the LANG variable be of quite arbitrary content also.<div><br></div><div><br></div><div>It would be of value for the Gambit code to be able to know the max Unicode char it can output just as not to run into IO exceptions .. or wait, the ISO-8859-1 does not map to a linear sequence of Unicode chars, or how is it?  - anyhow how avoid?</div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-16 15:45 GMT+02:00 Hendrik Boom <span dir="ltr"><<a href="mailto:hendrik@topoi.pooq.com" target="_blank">hendrik@topoi.pooq.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Fri, May 16, 2014 at 09:18:21AM -0400, Marc Feeley wrote:<br>
><br>
> On May 16, 2014, at 8:56 AM, Hendrik Boom <<a href="mailto:hendrik@topoi.pooq.com">hendrik@topoi.pooq.com</a>> wrote:<br>
><br>
> > On Fri, May 16, 2014 at 08:12:50AM -0400, Marc Feeley wrote:<br>
> >> This comment makes me wonder if ISO-8859-1 is the right default for ttys. Perhaps it would be less surprising if UTF-8 was the default.<br>
> >><br>
> >> Does anyone know of a way to autodetect the tty’s character encoding?  It would be nice if xterm could be forced to send a BOM so that Gambit would autodetect the character encoding (if ttys were started with the ___CHAR_ENCODING_UTF_FALLBACK_ISO_8859_1 character encoding mode). But I see no way of doing this after a quick look at xterm’s source code.<br>


> ><br>
> > There's always the environment variable LANG.  On my machine env tell me<br>
> >         LANG=en_CA.utf8<br>
> > and the .utf8 on the en_CA clues me in.<br>
><br>
> Is there a simple way to parse the LANG environment variable to determine the preferred character encoding?<br>
<br>
</div>Last time I looked at the list of languages for Debian (I think that<br>
was in the installer somewhere) just about every language appeared in<br>
two forms -- one with the suffix utf8 anen one without it,  So I'd<br>
guess it would be useful to just test whether the LANG variable ended<br>
with utf8.<br>
<br>
There might be exceptions to this, but if so we could wait to hear<br>
abbout them.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- hendrik<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</div></div></blockquote></div><br></div>