* bug#13008: Invalid oct number convertion in string
@ 2012-11-27 10:41 nalaginrut
2012-11-27 22:44 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: nalaginrut @ 2012-11-27 10:41 UTC (permalink / raw)
To: 13008
Here is the story:
=====================cut===============================
scheme@(guile-user)> (format #t "\033[32;31mhello\033[5m")
33[32;31mhello33[5m$2 = #t
scheme@(guile-user)> (format #t "\x1b[32;31mhello\x1b[5m")
hello (in red color)
=====================end===============================
Seems "\033" can't be converted to "\x1b", and I tried "\o1b" failed.
I believe it ought to be a bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13008: Invalid oct number convertion in string
2012-11-27 10:41 bug#13008: Invalid oct number convertion in string nalaginrut
@ 2012-11-27 22:44 ` Ludovic Courtès
2012-11-28 2:32 ` nalaginrut
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2012-11-27 22:44 UTC (permalink / raw)
To: nalaginrut; +Cc: 13008
Hi!
nalaginrut <nalaginrut@gmail.com> skribis:
> scheme@(guile-user)> (format #t "\033[32;31mhello\033[5m")
Here, \0 is taken to mean #\nul, and then there are two #\3.
IOW, there is no such syntax for octal escapes (info "(guile) String
Syntax").
What made you think otherwise?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13008: Invalid oct number convertion in string
2012-11-27 22:44 ` Ludovic Courtès
@ 2012-11-28 2:32 ` nalaginrut
2012-11-28 3:34 ` Daniel Hartwig
2012-11-28 13:41 ` Ludovic Courtès
0 siblings, 2 replies; 6+ messages in thread
From: nalaginrut @ 2012-11-28 2:32 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 13008
On Tue, 2012-11-27 at 23:44 +0100, Ludovic Courtès wrote:
> Hi!
>
> nalaginrut <nalaginrut@gmail.com> skribis:
>
> > scheme@(guile-user)> (format #t "\033[32;31mhello\033[5m")
>
> Here, \0 is taken to mean #\nul, and then there are two #\3.
>
> IOW, there is no such syntax for octal escapes (info "(guile) String
> Syntax").
>
> What made you think otherwise?
>
Thanks for reply!
It's fine in ruby-1.9 and python2, but python3 failed.
IIRC, Andy told me that guile2/python3 use "character string" rather
than "byte string", so there's different from others.
Now my question is, should we have octal-escapes? Is is impossible or
not implemented yet?
Thanks!
> Thanks,
> Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13008: Invalid oct number convertion in string
2012-11-28 2:32 ` nalaginrut
@ 2012-11-28 3:34 ` Daniel Hartwig
2012-11-28 5:58 ` nalaginrut
2012-11-28 13:41 ` Ludovic Courtès
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Hartwig @ 2012-11-28 3:34 UTC (permalink / raw)
To: nalaginrut; +Cc: 13008
On 28 November 2012 10:32, nalaginrut <nalaginrut@gmail.com> wrote:
>> > scheme@(guile-user)> (format #t "\033[32;31mhello\033[5m")
>>
>> Here, \0 is taken to mean #\nul, and then there are two #\3.
>>
>> IOW, there is no such syntax for octal escapes (info "(guile) String
>> Syntax").
>>
>> What made you think otherwise?
>>
> Now my question is, should we have octal-escapes? Is is impossible or
> not implemented yet?
You can use two or four digit hex codes, “\xHH” and “\uHHHH”. Is it
useful to support octal on top of that?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13008: Invalid oct number convertion in string
2012-11-28 3:34 ` Daniel Hartwig
@ 2012-11-28 5:58 ` nalaginrut
0 siblings, 0 replies; 6+ messages in thread
From: nalaginrut @ 2012-11-28 5:58 UTC (permalink / raw)
To: Daniel Hartwig; +Cc: 13008
On Wed, 2012-11-28 at 11:34 +0800, Daniel Hartwig wrote:
> On 28 November 2012 10:32, nalaginrut <nalaginrut@gmail.com> wrote:
> >> > scheme@(guile-user)> (format #t "\033[32;31mhello\033[5m")
> >>
> >> Here, \0 is taken to mean #\nul, and then there are two #\3.
> >>
> >> IOW, there is no such syntax for octal escapes (info "(guile) String
> >> Syntax").
> >>
> >> What made you think otherwise?
> >>
>
> > Now my question is, should we have octal-escapes? Is is impossible or
> > not implemented yet?
>
> You can use two or four digit hex codes, “\xHH” and “\uHHHH”. Is it
> useful to support octal on top of that?
Yes, I can use hex instead.
But, why we couldn't provide octal? Or it needs to be done?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13008: Invalid oct number convertion in string
2012-11-28 2:32 ` nalaginrut
2012-11-28 3:34 ` Daniel Hartwig
@ 2012-11-28 13:41 ` Ludovic Courtès
1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2012-11-28 13:41 UTC (permalink / raw)
To: nalaginrut; +Cc: 13008
nalaginrut <nalaginrut@gmail.com> skribis:
> Now my question is, should we have octal-escapes? Is is impossible or
> not implemented yet?
Nothing’s impossible, but there are already several kinds of escapes,
most of which are standardized, so I don’t think we need another one.
Closing this as not-a-bug.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-28 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 10:41 bug#13008: Invalid oct number convertion in string nalaginrut
2012-11-27 22:44 ` Ludovic Courtès
2012-11-28 2:32 ` nalaginrut
2012-11-28 3:34 ` Daniel Hartwig
2012-11-28 5:58 ` nalaginrut
2012-11-28 13:41 ` Ludovic Courtès
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).