Java JNI: Passing multibyte characters from java to c
问题 I'm once again messing around with the java natve interface, and I've runned into another interesting problem. I'm sending a filepath to c via jni and then doing some I/O. So the most common chars I have troubles with is 'äåö' . Here is a short demo of a program with the exact same problem: Java: public class java { private static native void printBytes(String text); static{ System.loadLibrary("dll"); } public static void main(String[] args){ printBytes("C:/Users/ä-å-ö/Documents/Bla.txt"); }