View Issue Details

IDProjectCategoryView StatusLast Update
0001135OpenMPT[All Projects] libopenmptpublic2018-08-02 15:21
ReportermanxAssigned Tomanx 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product VersionOpenMPT 1.27.09.00 / libopenmpt 0.3.11 (current stable) 
Target VersionFixed in Version 
Summary0001135: mpt::fstream is broken on MinGW for unicode filenames
Description

mpt::fstream converts wchar_t filenames to ANSI because MinGW does not support overloads for const wchar_t in std::fstream and friends.

Additional Information

A possible solution might be to make use of GCC libstdc++ specific __gnu_cxx::stdio_filebuf and use _wopen or similar under the hood.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Relationships

child of 0000925 newmanx Support for external samples in libopenmpt 

Activities

manx

manx

2018-08-02 15:21

administrator   ~0003585

There are also 2 "not-really-fixes" options to "fix" this:

  1. Wait for C++17 support, which includes std::filesystem support, which will handle unicode filenames properly. However, given GNU's attitude towards Windows, it will probably take close to forever to actually get std::filesystem support in MinGW.
  2. Remove iostreams for IO completely. We are actually not that far away from this option any more, since most member function calls on iostreams objects have already been converted to mpt::IO free functions which allow to trivially exchange the underlying file object type.

Issue History

Date Modified Username Field Change
2018-08-02 15:06 manx New Issue
2018-08-02 15:06 manx Status new => assigned
2018-08-02 15:06 manx Assigned To => manx
2018-08-02 15:07 manx Relationship added child of 0000925
2018-08-02 15:21 manx Note Added: 0003585