Skip Menu |

To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
From: Dan Zwell <dan [...] zwell.net>
Date: Thu, 16 Nov 2017 10:27:50 +0000
Subject: Unicode: Windows shells print garbage instead of "「」"
Download (untitled) / with headers
text/plain 562b
The Windows command shells I've used (CMD and Cmder) fail to print the "「」" that are part of stringified matches. This is a significant issue, since new users use regular expressions when working through tutorials.

Since pasting these characters into the console will also yield garbage, I suggest we pick different symbols, like "┘┌", instead. (IMO, it's important to choose two symbols that will not blend together when showing an empty match.)

The current output:
> say 'a' ~~ /./
「a」

Note: I'm using the October 2017 Rakudo release.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 849b
On Thu, 16 Nov 2017 02:28:11 -0800, dan@zwell.net wrote: Show quoted text
> The Windows command shells I've used (CMD and Cmder) fail to print the "「」" > that are part of stringified matches. This is a significant issue, since > new users use regular expressions when working through tutorials. > > Since pasting these characters into the console will also yield garbage, I > suggest we pick different symbols, like "┘┌", instead. (IMO, it's important > to choose two symbols that will not blend together when showing an empty > match.) > > The current output:
> > say 'a' ~~ /./
> 「a」 > > Note: I'm using the October 2017 Rakudo release.
That's because Windows cmd.exe isn't using UTF-8 by default. You need to run `chcp 65001` to switch to the proper code page. -1 on trying to cater to cmd.exe's featureset or using mismatched brackets.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org