Dynamic change of encoding under MAC OSX

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
briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 672
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Dynamic change of encoding under MAC OSX

Post by briceandre »

Dear all,

I am facing an issue with an application that loads a java virtual machine by using JNI interface.

Before starting the java virtual machine, the application is running fine. But, under Mac, once the java virtual machine is launched (JNI_CreateJavaVM), the application is starting interpreting strings encoded in UTF-8 as if they were ISO-8859-1 encoded.

So, for example, the following sample code is displaying correctly (i.e. "é")before JVM start, and improperly after (i.e. "é"):

Code: Select all

 wxMessageBox("é");
Note that same code under Windows is working fine.

My best guess is that, during launching of JVM, something is changed in the parameters of the process, but I don't find what.

Any idea ?

Thanks in advance,
Brice

EDITED : version of wxWidgets 3.0.0 (slighlty patched), compiler clang, platform Mac OSX 10.12.4, version of JVM : 1.8.0_131.
User avatar
marcelinux
Knows some wx things
Knows some wx things
Posts: 40
Joined: Thu Nov 07, 2013 9:59 pm
Location: Madrid, Spain

Re: Dynamic change of encoding under MAC OSX

Post by marcelinux »

briceandre wrote: wxMessageBox("é");

Code: Select all

wxMessageBox(wxT("é"));
I just need learn a little bit more. Thank you for your help.
Post Reply