unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: David Pirotte <david@altosw.be>
To: guile-user <guile-user@gnu.org>
Subject: guile-2.0  - Character Encoding of Source Files - #! ... !# not working [low priority]
Date: Wed, 9 Mar 2011 22:06:45 -0300	[thread overview]
Message-ID: <20110309220645.17b000eb@rascar> (raw)

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Hi

Just because I hit it today i am reporting this, but with low priority. I got into
this small problem [a very small and ridiculous example for the sake of
'demonstration']: the doc says [6.17.7]

	The coding declaration must appear in a scheme comment. It can either be a
	semicolon-initiated comment or a block #! comment. 

if you deposit the 3 attached files somewhere in your guile-load-path, 
chmod a+x test-iso-preceeding-comment

and execute it it's ok. but if you comment (use-modules (test-1)) and uncomment
(use-modules (test-2)) it's not

Cheers,
David


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test-1.scm --]
[-- Type: text/x-scheme, Size: 156 bytes --]

;;; -*- coding: iso-8859-1 -*- 
#!
this is working
!#

(define-module (test-1))

;; mais on le renvoit quand même filtré

(define (test)
  #t)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: test-2.scm --]
[-- Type: text/x-scheme, Size: 155 bytes --]

#! -*- coding: iso-8859-1 -*- 
this is not working
!#

(define-module (test-2))

;; mais on le renvoit quand même filtré

(define (test)
  #t)


[-- Attachment #4: test-iso-preceeding-comment --]
[-- Type: application/octet-stream, Size: 408 bytes --]

#!/bin/sh
# -*- scheme -*-
exec guile -e main -s $0 "$@"
!#

;; voilà, en bon français. here the iso-8859-1 chars are 'accepted'
;; because who read them is /bin/sh


;; this is ok
(use-modules (test-1))

;; but commenting the previous line and uncommenting this one will
;; lead to an error
;; (use-modules (test-2))

(define (main args)
  (display "Hello\n")
  (display args)
  (display "\nBye now\n")
  )

             reply	other threads:[~2011-03-10  1:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  1:06 David Pirotte [this message]
2011-03-31 12:47 ` guile-2.0 - Character Encoding of Source Files - #! ... !# not working [low priority] Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110309220645.17b000eb@rascar \
    --to=david@altosw.be \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).