← Back to team overview

kicad-developers team mailing list archive

Pcbnew EAGLE plugin file names issue under Windows (file not found)

 

Dick,
First off all, tanks you for all this work.

(const char*) aFileName.fn_str() creates an issue under Windows (tested with wxWidgets 2.9.3)

I am thinking it returns a string of 16 bits wchars, not compatible with 8 bits chars,
at least under Windows.
I do not know why it works under Linux, and not under Windows.

(const char*)aFileName.char_str( wxConvFile ) works fine for me under Windows and Linux
(tested with filenames using non ascii chars).


Here is my patch:

=== modifié fichier pcbnew/eagle_plugin.cpp
--- pcbnew/eagle_plugin.cpp	2012-06-02 17:07:30 +0000
+++ pcbnew/eagle_plugin.cpp	2012-06-03 14:46:36 +0000
@@ -975,7 +975,7 @@
         // 8 bit "filename" should be encoded according to disk filename encoding,
         // (maybe this is current locale, maybe not, its a filesystem issue),
         // and is not necessarily utf8.
-        std::string filename = (const char*) aFileName.fn_str();
+        std::string filename = (const char*) aFileName.char_str( wxConvFile );

         read_xml( filename, doc, xml_parser::trim_whitespace | xml_parser::no_comments );



--
Jean-Pierre CHARRAS



References