[Issue 8643] New: [snn] _wfopen and other non-standard wide-character functions fail with non-ASCII symbols

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 11 13:15:29 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8643

           Summary: [snn] _wfopen and other non-standard wide-character
                    functions fail with non-ASCII symbols
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com
            Blocks: 7648


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-09-12 00:15:52 MSD ---
---
import std.file: write;
import core.stdc.stdio: perror;

extern (C) nothrow int _wrename(in wchar* from, in wchar* to);

void main()
{
    // write("1.txt", "123");
    if(_wrename("1.txt"w.ptr, "2Ю.txt"w.ptr))
        perror("Error renaming file");
}
---

Output:
---
Error renaming file: Invalid argument
---
if:
* there is no 1.txt file
* there is 1.txt file
* there is no 1.txt file and `write` is uncommented

Output:
---
Error renaming file: File exists
---
if:
* there is 1.txt file and `write` is uncommented

-- 
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