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

* [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10]
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gran @ 2010-06-05 16:29 UTC (permalink / raw)
  To: Mike Gran, Ludovic Courtès, bug-guile


Update of bug #29643 (project guile):

                  Status:                    None => Confirmed              
             Assigned to:                    None => mike121                


    _______________________________________________________

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

* [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10]
  2010-06-05 16:29 ` Mike Gran
@ 2010-06-05 21:51   ` Mike Gran
  2010-07-17 11:25     ` Mike Gran
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gran @ 2010-06-05 21:51 UTC (permalink / raw)
  To: Mike Gran, Ludovic Courtès, bug-guile


Update of bug #29643 (project guile):

                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #1:

I pushed a new branch to the repo "mike-port-encodings" that may solve the
problem.

Consider the top commit
62abf139798af3f35ca3c89200389dc75d51a159

Note that while I was in there, I decided that a similar problem to this bug
is that open-file doesn't honor binary-mode it its port encoding, so I added
that feature.

Working this revealed unrelated bugs in read-line and
scm_i_scan_for_encoding, which are also patched in that branch.

    _______________________________________________________

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

* [bug #29643] Current locale has higher precedence than `coding:' when determining file port encoding [1.9.10]
  2010-06-05 21:51   ` Mike Gran
@ 2010-07-17 11:25     ` Mike Gran
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Gran @ 2010-07-17 11:25 UTC (permalink / raw)
  To: Mike Gran, Ludovic Courtès, bug-guile


Update of bug #29643 (project guile):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

I pushed a branch that fixed the problem

e50d921bd87e53df33c04831ecf8b3d100af2b7b

    _______________________________________________________

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