首页 > 解决方案 > 如果路径包含非拉丁字符则出错

问题描述

操作系统:windows 10 Perl6:这是 Rakudo Star 版本 2018.04.1,基于 MoarVM 版本 2018.04.1 实现 Perl 6.c。

例子:

perl6 C:\Users\quest\Desktop\example.pl
# sucess

perl6 "C:\Users\quest\Desktop\яп\Perl 6\web-scraping\request.pl"
# Could not open C:\Users\quest\Desktop\╤П╨┐\Perl 6\web-scraping\request.pl. Failed to open file C:\Users\quest\Desktop\╤П╨┐\Perl 6\web-scraping\request.pl: No such file or directory

Python 3 示例:

py "C:\Users\quest\Desktop\яп\py\3\timetest.py"
# sucess

标签: raku

解决方案


如您所见,Windows 10 支持非 Unicode(即非 UTF-16)应用程序的 UTF-8(根据 Wikipedia,此功能是在 2018 年 4 月发布的 build 17035 中添加的,并且仍标记为“beta”) . 这让乐藤很高兴。

但是,在 Python 设法做到这一点时不尊重您的语言环境似乎仍然值得向我报告错误


推荐阅读