[Issue 7648] Can't open file (Windows UTF8)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 10 16:21:02 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7648
Martin Krejcirik <mk at krej.cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mk at krej.cz
--- Comment #1 from Martin Krejcirik <mk at krej.cz> 2012-03-10 16:21:07 PST ---
(In reply to comment #0)
> auto file2 = File("Привет.txt");
Can't test with this filename as I have no Russian support, but it works for me
with accented characters.
import std.stdio, std.stream;
void main(char[][] args)
{
char[] filename;
if (args.length==2)
filename=args[1];
else
filename="utfname-žlutý.txt";
writefln("filename: %s", filename);
File file = new File(filename);
}
However, what doesn't work is reading UTF8 from the commandline (using chcp
65001):
D:\devel\bugs>utfname
filename: utfname-žlutý.txt
D:\devel\bugs>utfname utfname-zluty.txt
filename: utfname-zluty.txt
D:\devel\bugs>utfname utfname-žlutý.txt
Error: 1invalid UTF-8 sequence
filename:
OS Windows XP Czech
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list