JDK-4481877 : multi-byte chars ("(B") sent to title bar of windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.7,1.3.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5.1,solaris_8
  • CPU: sparc
  • Submitted: 2001-07-19
  • Updated: 2002-09-06
  • Resolved: 2002-09-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
1.4.2 mantisFixed
Related Reports
Duplicate :  

Name: yyT116575			Date: 07/19/2001

java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

Create a simple java program that displays a window (code to follow).  The
window title begins with 'Esc'(B then the title string.  This can be seen
most easily on the FVWM window manager compiled without multi-byte support.

If $LANG and $LC_CTYPE are set to en_US.ISO8859-1 or just about any other
language, then multi-byte chars are sent to the title bar of a window.

I used "xprop" to look at the property WM_NAME which is where the title
comes from.

Without LANG set, Java sets WM_NAME like this:
WM_NAME(COMPOUND_TEXT) = 0x54, 0x68, 0x69, 0x73, ...

With LANG set, Java sets WM_NAME like this:
WM_NAME(COMPOUND_TEXT) = 0x1b, 0x28, 0x42, 0x54, ...

The 0x54 is the first character of the windows title, an uppercase T.

So with LANG set, the characters "0x1b, 0x28, 0x42," ("Esc ( B") are
added to the window title.

If Fvwm is compiled with multibyte support, that string is passed thru
XmbTextPropertyToTextList() which removes the "Esc ( B" prefix.

I think this should be persued with Sun.  So far I see 2 issues:

I don't see why fvwm should need to  support Multibyte characters when
the language is explicitly set to en_US, or fr_CA, neither of these
languages are multibyte.

I don't think it's correct for Java to be setting the text property to
COMPOUND_TEXT when LANG isn't set.  Normally the property on a title
would be STRING.

Here is the code to reproduce:
import javax.swing.*;

public class WindowTest {
  static void main (String[] args) {
    JFrame win = new JFrame ("This is the window Title");
    //win.setTitle ("Window Title 2");
    win.getContentPane().add (new JLabel ("Test the JWindow"));
    win.setSize (200, 200);
    win.show ();

Here is a url to image of the window created:


I am running on Solaris 8 with FVWM 2.4.0.  I've tested this in both 1.3.1 and
Java 1.4-beta.
(Review ID: 128437) 

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis

EVALUATION I don't believe fvwm is officially supported. richard.ray@eng 2001-07-19 There may be some relevant text about APIs for manipulating COMPOUND_TEXT in 4480365. ###@###.### 2001-09-12