unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10]
@ 2010-04-22 16:36 Ludovic Courtès
  2010-06-05 16:29 ` Mike Gran
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2010-04-22 16:36 UTC (permalink / raw)
  To: Ludovic Courtès, bug-guile


URL:
  <http://savannah.gnu.org/bugs/?29643>

                 Summary: Current locale has higher precedence than `coding:'
when determining file port encoding [1.9.10]
                 Project: Guile
            Submitted by: civodul
            Submitted on: Thu 22 Apr 2010 04:36:39 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Consider this example:

#v+
scheme@(guile-user)> (setlocale LC_ALL "")
$1 =
"LC_CTYPE=en_US.UTF-8;LC_NUMERIC=en_US.UTF-8;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8"
scheme@(guile-user)> (open-input-file "module/scripts/compile.scm")
$2 = #<input: module/scripts/compile.scm 81>
scheme@(guile-user)> (port-encoding $2)
$3 = "UTF-8"
scheme@(guile-user)> (file-encoding $2)
$4 = "ISO-8859-1"
#v-

This file reads "-*- coding: iso-8859-1 -*-" so it should be open using a
Latin-1 encoding, regardless of the current locale's encoding.

Ludo'.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29643>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-17 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 16:36 [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10] Ludovic Courtès
2010-06-05 16:29 ` Mike Gran
2010-06-05 21:51   ` Mike Gran
2010-07-17 11:25     ` Mike Gran

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).