* guile-2.0 - Character Encoding of Source Files - #! ... !# not working [low priority]
@ 2011-03-10 1:06 David Pirotte
2011-03-31 12:47 ` Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: David Pirotte @ 2011-03-10 1:06 UTC (permalink / raw)
To: guile-user
[-- 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")
)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-31 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 1:06 guile-2.0 - Character Encoding of Source Files - #! ... !# not working [low priority] David Pirotte
2011-03-31 12:47 ` Andy Wingo
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).