|
From: Bastian M. <bma...@we...> - 2020-12-03 09:49:58
|
Dear Allin,
sorry for being slow to work on this. There is a fundamental issue with
the approach, which I am working on how to resolve best. Translating all
the command line arguments to UTF-8 is a great step forward and the
loading of files works fine as you point out. But this change also
affects and potentially breaks the -e option (try e.g.
-d -e "print 'öäü'").
The best step in my opinion might be to just change gnuplot's default
encoding to utf8. This will break backward compatibility, though. A
remedy could be new command line options -a/-u which choose the system's
default encoding ("ANSI") or the utf8 encoding.
Please find attached a simplified version of your patch, which also
works for console mode gnuplot and other compilers than MinGW. It does
not yet address the issue discussed above, though.
Bastian
> Gesendet: Samstag, 14. November 2020 um 22:41 Uhr
> Von: "Allin Cottrell" <cot...@wf...>
> An: "gnuplot-beta" <gnu...@li...>
> Betreff: filenames on MS Windows: follow-up
>
> I'm attaching a patch against gnuplot git master which does what I
> mentioned in
> https://sourceforge.net/p/gnuplot/mailman/message/37141539/ That is,
> it allows wgnuplot.exe to accept via the Windows command-line
> unicode filenames that cannot be represented in the user's "system
> codepage", and to successfully to open such files.
>
> This iteration of my patch uses native win32 APIs to perform the
> necessary recoding of filenames, as opposed to the previous
> iteration which used GLib.
>
> I gave evidence in
> https://sourceforge.net/p/gnuplot/mailman/message/37143153/
> that the patch is not disruptive of gnuplot's ability to open files
> named via the "load" command, in which case the encoding specified
> in the gnuplot script must be respected.
>
> The patch is activated only when compiling the program for Windows,
> and then only when the symbol WIDE_ARGS is defined.
>
> --
> Allin Cottrell
> Department of Economics
> Wake Forest University_______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
> |