将 Unicode 字符打印到 shell
Printing Unicode characters to the shell
我想在 cmd
中输出一个 Unicode 字符,但明显的方法失败了:
C:\Windows\System32>perl6 -e "'Я'.say"
?
有趣的是,这个有效:
C:\Windows\System32>perl6 -e "Buf.new(0xD0, 0xAF).decode('UTF-8').say"
Я
这里似乎有什么问题?
编辑:我使用的是 here 的最新 Rakudo Star 版本。
C:\Windows\System32>perl6 -v
This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
implementing Perl 6.c.
问题是 Windows 上缺少测试。请提交针对 Rakudo 的错误报告。如果您有最新的 Rakudo Star 版本。
更新:错误已提交,问题已得到修复。
C:\Windows\System32>perl6 -v
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.
C:\Windows\System32>perl6 -e "'Я'.say"
Я
Sinan Ünür has written an interesting blog post关于问题
我想在 cmd
中输出一个 Unicode 字符,但明显的方法失败了:
C:\Windows\System32>perl6 -e "'Я'.say"
?
有趣的是,这个有效:
C:\Windows\System32>perl6 -e "Buf.new(0xD0, 0xAF).decode('UTF-8').say"
Я
这里似乎有什么问题?
编辑:我使用的是 here 的最新 Rakudo Star 版本。
C:\Windows\System32>perl6 -v
This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
implementing Perl 6.c.
问题是 Windows 上缺少测试。请提交针对 Rakudo 的错误报告。如果您有最新的 Rakudo Star 版本。
更新:错误已提交,问题已得到修复。
C:\Windows\System32>perl6 -v
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.
C:\Windows\System32>perl6 -e "'Я'.say"
Я
Sinan Ünür has written an interesting blog post关于问题