- From: "Andrew Cowie" <install-module gnome org>
- To: FTP Releases <ftp-release-list gnome org>
- Subject: java-gnome 4.0.13
- Date: Thu, 27 Aug 2009 03:23:37 +0000 (UTC)
Uploaded by: Andrew Cowie
<a name="4.0.13" id="1251341992" title="Fix unicode handling"></a>
java-gnome 4.0.13 (27 Aug 2009)
_Unicode. It's bigger than you think._
This is a bug fix release to address a serious weakness in Java's handling of
It turns out that Java's chars are **not** pure Unicode codepoints. Most
people know that Java String objects are arrays of Java chars, but in
aggregate they are encoded in UTF-16 in order to deal with the fact that there
are Unicode characters whose index is higher than `0xFFFF` and which need more
than two bytes to identify them. It's a problem that an application developer
has to deal with if they're using high-range "supplementary" Unicode
characters, but wasn't something that would break java-gnome...
Except it turns out that the Java VM does not do UTF-8 translation properly.
It has a hard wired limitation preventing it from writing out UTF-8 sequences
longer than 3 bytes. Who knows what crack they were smoking when they decided
that one. But things like TextView / TextBuffer work in characters, so we need
characters. (actually, they work in UTF-8 bytes, but the offsets in our public
API are the characters variants).
Luckily, we can get at the raw UTF-16 arrays backing Strings, and so in
combination with GLib's character set conversion functions, we've been able to
redo our string handling internally so as to have correct treatment of Unicode
codepoints. Lots of testing.
This surgery was almost entirely internal; Strings returned by java-gnome
methods are of course still Java String objects. There was only one signature
change in the public API: TextIter's `getChar()` now returns Java int, not
<img src="doc/api/org/gnome/gtk/Entry.png" alt="" style="float: right;
text-align: right; padding-left: 15px;" /> This release also features the work
of Guillaume Mazoyer exposing some of the new features available in Entry
Widgets, including displaying icons and showing progress bars in the
Along with minor enhancements to various miscellaneous classes.
With this release, java-gnome now requires GTK `2.16` or newer.
An RSS 2.0 feed of ftp-release-list is available at:
] [Thread Prev