bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #29643] Current locale has higher precedence than `coding:' when de


From: Ludovic Courtès
Subject: [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10]
Date: Thu, 22 Apr 2010 16:36:40 +0000
User-agent: Mozilla/5.0 (GNU; rv:1.9.1.7) Gecko/20100107 IceCat/3.6 (like Firefox/3.6)

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]