#1377 Gnuplot for windows thousands separator in "set format"

closed-wont-fix
nobody
None
5
2015-03-23
2014-04-10
Anonymous
No

Gnuplot 4.6.3 running on windows 7 does not working with "set format y "%'12.0f"". On linux version running on SUSE Linix Enterprise Server it works fine - thousands separator ' (an apostrophe) is appearing on Y tics (set ytics). On windows version i see only %'12.0f on Y label.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-04-10

    gnuplot passes the format to the c library function snprintf(), which is supposed to apply locale-dependent conversions and numerical conventions. As you say, this works on linux systems.

    For reasons unknown to me, MicroSoft does not provide a C-standard snprintf. MSVC has instead a function _snprintf that is sort of the same but not quite, and mingw adds a further layer ms_snprintf.

    Furthermore locale support under Windows also seems to work differently in practice. So it is possible that the snprintf/ms_snprintf/_snprintf stack would handle it properly if the locale were set a little differently.

    All of which is a long way of saying "we rely on the c library for this feature". The quirks of your local c library will vary. Was your gnuplot built with mingw or MSVC or something else entirely? What c library is it linked against?

     
  • Bastian Märkisch

    In fact the ' printf operator is non-standard. It is not supported by the Windows C runtime msvcrt.dll. MinGW has it's own versions of printf and friends which may or may not support this operator, but the gnuplot 4.6.3 binary was built without this.

     
  • Ethan Merritt

    Ethan Merritt - 2014-05-27
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks