RE: [java-gnome-hackers] String encoding | showAll() | ButtonBox example
Brought to you by:
afcowie
|
From: Jeffrey M. <Jef...@Br...> - 2002-08-19 11:30:31
|
> I've been working on an example app for the ButtonBoxes: > /src/examples/gtk/buttonbox/ButtonBoxes.java > (I have implemented gtk Frame btw) > > The main problem seems to be with string encodings. > The button box example gives the warnings: > ** (java-gnome:14365): WARNING **: Invalid UTF8 string passed to > pango_layout_set_text() > > In my code, I have been using String.getBytes() with no encoding > argument. I guess this is wrong. I have tried a few examples and read > through the gtk docs, but have been unable to determine what should be > passed to the getBytes method. > > This seems to affect all classes which pass Strings to native methods. If you get the latest from cvs and run the generator it will produce C code that will fix this problem. We now have the task of merging this C code with the code in the src/jni directory. I will do this for all of the glib, atk, pango, and gtk classes today. The Java will not change; you still need to pass in an array of bytes. -Jeff |