>>>>> "Lillian" == Lillian Angel <[EMAIL PROTECTED]> writes:
Lillian> PR 24937 Lillian> * gnu/java/awt/peer/gtk/GdkGraphics.java Lillian> (drawString): Removed pattern matching code. This is now Lillian> done in native. Lillian> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c Lillian> (Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString): Added Lillian> a loop to filter out all non-printing characters. Lillian> cstr = (*env)->GetStringUTFChars (env, str, NULL); Lillian> + sTmp = cstr; Lillian> + for (; *sTmp != '\0'; sTmp++) Lillian> + if (isprint(*sTmp)) I don't think this does what you intend it to do. isprint() takes a C 'char' and tells you whether it is printable. But, this string doesn't contain plain old chars -- a given char might be the start of a multi-byte UTF-8 representation of some Unicode character. isprint() won't know about this, and might well return false for something which is perfectly displayable... I suggest testing with some characters outside of the ordinary Latin 1 range. If you are only trying to delete newlines, I suggest just checking for those directly. Or, if you want to handle all control characters I think you could just do something like: if ((unsigned char) *sTmp < ' ')... Tom _______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches