Perl 6 编辑器、IDE 以及 编码显示问题

There's more than one way to do it!
https://metacpan.org http://perlmonks.org
回复
头像
523066680
Administrator
Administrator
帖子: 573
注册时间: 2016年07月19日 12:14
联系:

Perl 6 编辑器、IDE 以及 编码显示问题

帖子 523066680 »

官方给的一个支持Perl6的编辑器列表
https://perl6.org/whatever/

不过我遇到的主要问题主要是命令行无法显示Perl6的一些输出字符,比如 「 」,设置 chcp 65001 也不能正常显示。
设置终端字体为新宋体后,可以显示了,但是又多出两个方块
C:\Users>chcp 65001 Active code page: 65001 C:\Users>perl6 To exit type 'exit' or '^D' > say "hello" ~~ / \w+ / 「hello」 �� >
两篇相关的帖子:
https://www.nu42.com/2014/11/perl6-utf- ... ndows.html
https://www.nu42.com/2014/05/utf-8-oupu ... ms-in.html

cmder 改成宋体,显示良好。

目前使用Sublime Text 3 作为编辑环境
ST3 perl6 语法高亮插件
https://github.com/damaxi/sublimetext3_perl6_plugin
保存到 C:\Users\%USERNAME%\AppData\Roaming\Sublime Text 3\Packages\User 目录

对应的build文件,将 encoding 设置为 utf8
{
"path": "C:/rakudo/bin;$path",
"cmd": ["cmd", "/c", "perl6 $file"],
"file_regex": ".* at (.*) line ([0-9]*)",
"selector": "source.perl6",
"encoding": "utf8"
}
头像
523066680
Administrator
Administrator
帖子: 573
注册时间: 2016年07月19日 12:14
联系:

Re: Perl 6 编辑器、IDE 以及 编码显示问题

帖子 523066680 »

在终端环境下可以用 ~ 替换 「」

代码: 全选

> say "number123" ~~ /\d/
锝?锝?
> say ~("number123" ~~ /\d/)
1
回复

在线用户

正浏览此版面之用户: 没有注册用户 和 1 访客