www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7648] New: Can't open file (Windows UTF8)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648

           Summary: Can't open file (Windows UTF8)
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: deep0125 gmail.com



Created an attachment (id=1080)
source and exe

Can't open file.



Look in the archive

source:

-----------------------main.d
import std.stdio;

int main(string[] argv)
{
   auto file2 = File("Привет.txt");
   return 0;
}
---------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 05 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648


Martin Krejcirik <mk krej.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mk krej.cz




    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: -------
Mar 10 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648






    auto file2 = File("Привет.txt");
Can't test with this filename as I have no Russian support, but it works for me
Easy, download attached archive and extract to disk. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 11 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648





 Easy, download attached archive and extract to disk.
OK, tried, same error as you reported. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 13 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg gmail.com



11:27:11 MSD ---

 However, what doesn't work is reading UTF8 from the commandline (using chcp
 65001):
Your program is written in (outdated) D1 so you are affected by Issue 1188. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 06 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648




11:54:48 MSD ---
*** Issue 8020 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648




00:57:31 MSD ---
Fix for Phobos related part:
https://github.com/D-Programming-Language/phobos/pull/788

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 11 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/e5e123854e28b759418791744402491d82840140
Partial Fix Issue 7648 - std.stdio expects file names to be encoded in CP_ACP
on Windows instead of UTF-8

https://github.com/D-Programming-Language/phobos/commit/53a19c8d32610f5398a717a4e66a746211f5b7c9


Partial fix Issue 7648

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 16 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7648




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/c372571d1f868abd2294944b617f3863184462fe
Add note about Issue 7648 to `std.stdio.File`.

Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=7648

https://github.com/D-Programming-Language/phobos/commit/176976a57baf2505db894a314921dbaf8e347154


Add note about Issue 7648 to `std.stdio.File`.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 17 2013