Currency not Latin fields issue Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
maximand
Experienced Solver
Experienced Solver
Posts: 79
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

Currency not Latin fields issue

Post by maximand »

I've discovered that the code:

Code: Select all

    wxString s = wxString::Format(L"INSERT INTO CURRENCYFORMATS_V1 VALUES (2, '%s', '%s', '%s', '%s', '%s', '%s', '%s', 100, 1, '%s')"
        , "European euro", L"€", "", ".", " ", "", "", "EUR");
Working fine if placed, for example, in some_file.cpp
Image

But this code in other_file.h provide another result:
Image

This issue can't be reproduced on MAC (may be on Linux as well).
Please any ideas how to fix?
M$, VS2017, C++
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Currency not Latin fields issue

Post by doublemax »

Hard to tell. If it works in one source file, but not in another, there must be something different. Maybe a missing header file ( e.g "wx/wx.h" ) or maybe the encoding of the source file itself.
Use the source, Luke!
maximand
Experienced Solver
Experienced Solver
Posts: 79
Joined: Fri Nov 11, 2011 5:44 pm
Location: Russia

Re: Currency not Latin fields issue

Post by maximand »

Thank you Max,

The encoding for incorrect file is UTF-8 without BOM. If converted to UTF-8 it's working fine.
I'll try as well:

Code: Select all

#pragma execution_character_set("utf-8")
M$, VS2017, C++
Post Reply