GNU bug report logs -
#15033
[PATCH] Fix display of symbols containing backslashes
Previous Next
Reported by: David Kastrup <dak <at> gnu.org>
Date: Tue, 6 Aug 2013 13:45:02 UTC
Severity: normal
Tags: patch
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15033 in the body.
You can then email your comments to 15033 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#15033
; Package
guile
.
(Tue, 06 Aug 2013 13:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Kastrup <dak <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Tue, 06 Aug 2013 13:45:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Symbols printed with `#{...#}' notation need to double backslashes when
displaying as they serve as escape characters when reading. The
behavior before this patch is clearly erroneous:
GNU Guile 2.0.7
[...]
scheme@(guile-user)> (string->symbol "\\(")
$1 = #{\\x28;}#
scheme@(guile-user)> (symbol->string '#{\\x28;}#)
$2 = "\\x28;"
---
libguile/print.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libguile/print.c b/libguile/print.c
index 50f5a3e..bb7fd84 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -448,7 +448,8 @@ print_extended_symbol (SCM sym, SCM port)
SUBSEQUENT_IDENTIFIER_MASK
| UC_CATEGORY_MASK_Zs))
{
- if (!display_character (c, port, strategy))
+ if (!display_character (c, port, strategy)
+ || (c == '\\' && !display_character (c, port, strategy)))
scm_encoding_error ("print_extended_symbol", errno,
"cannot convert to output locale",
port, SCM_MAKE_CHAR (c));
--
1.8.1.2
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Tue, 06 Aug 2013 22:05:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Kastrup <dak <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 06 Aug 2013 22:05:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 15033-done <at> debbugs.gnu.org (full text, mbox):
David Kastrup <dak <at> gnu.org> writes:
> Symbols printed with `#{...#}' notation need to double backslashes when
> displaying as they serve as escape characters when reading. The
> behavior before this patch is clearly erroneous:
>
> GNU Guile 2.0.7
> [...]
> scheme@(guile-user)> (string->symbol "\\(")
> $1 = #{\\x28;}#
> scheme@(guile-user)> (symbol->string '#{\\x28;}#)
> $2 = "\\x28;"
> ---
> libguile/print.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libguile/print.c b/libguile/print.c
> index 50f5a3e..bb7fd84 100644
> --- a/libguile/print.c
> +++ b/libguile/print.c
> @@ -448,7 +448,8 @@ print_extended_symbol (SCM sym, SCM port)
> SUBSEQUENT_IDENTIFIER_MASK
> | UC_CATEGORY_MASK_Zs))
> {
> - if (!display_character (c, port, strategy))
> + if (!display_character (c, port, strategy)
> + || (c == '\\' && !display_character (c, port, strategy)))
> scm_encoding_error ("print_extended_symbol", errno,
> "cannot convert to output locale",
> port, SCM_MAKE_CHAR (c));
Applied in b4a099883d20d7852c95acf07ab6cbc56bce18c4.
Thanks!
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 04 Sep 2013 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.