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/