Subject: Notification: incoming/741

From: [email-masked]
Date: Mon, 16 Jul 2001 07:31:59 -0500

FVWM Bug Tracking notification

new message incoming/741

Message summary for PR#741
	From: [email-masked]
	Subject: >(B appears before every Java Window
	Date: Mon, 16 Jul 2001 07:31:57 -0500
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [email-masked] Mon Jul 16 07:31:59 2001
From: [email-masked]
To: [email-masked]
Subject: >(B appears before every Java Window
Date: Mon, 16 Jul 2001 07:31:57 -0500

Full_Name: Keith Spainhour
Version: 2.4.0
CVS_Date: 
OS: Solaris 8
X_Server: 
Submission from: (NULL) (64.102.86.89)

Using Java 1.3.1 and Java 1.4 Beta, all Java Windows, (JFrame, JWindow)
begin with >(B and then the window title.  Sun claims this is a FVWM bug.
I have not seen this on any other window manager.

Here is a url to a picture of a window:
http://www.employees.org/~keiths/WindowTest.gif

Here is ths java source code to reproduce:

import javax.swing.*;

public class WindowTest
{
    static void main (String[] args)
    {
        JFrame win = new JFrame ();
        win.getContentPane().add (new JLabel ("Test the JWindow"));
        win.setSize (200, 200);
        win.pack();
        win.show ();
    }
}

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 17 Jul 2001 07:31:09 -0400

When I run this with 1.3 or 1.2 FvwmIdentify reports no name or icon
label as would be expected.  If you run win.setTitle("to some title");
I don't know how you could be getting the title you depict in your
screenshot.

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Tue, 17 Jul 2001 12:41:39 +0100

> I don't know how you could be getting the title you depict in your

This rings an ancient bell, it might be something in the environment
(like $LANG or something) that swing is picking up. I used to get funny
chars in the title of CDE apps when I had LANG=uk or whatever the
default was on my system. I think it might be a hacky thing in swing
that should go away when everything move to the new window manager hints
standard.

Cheers,
Tim.

---

From: Keith Spainhour <[email-masked]>
Date: Tue, 17 Jul 2001 07:53:16 -0400

This is my fault.  I sent you the wrong test source code.  I'm running
a number of test cases for Sun.  Anyway attached is the correct source
code that produced the image listed in my previous email.

I tried with both the constructor and with using setTitle, both
produced the same results.

-- 
Keith Spainhour              919-392-5673
Software Engineer	     [email-masked]
Cisco Systems		     http://www.cisco.com

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.pack();
        win.show ();
    }
}

---

From: Dan Espen <[email-masked]>
Date: Tue, 17 Jul 2001 08:39:34 -0400

> code that produced the image listed in my previous email.

Whats your $LANG setting?

If I "unset LANG", the title is fine.
If I set it to "fr_CA", or even "en_US" I see the problem.

Why does Java think that "en_US" needs a multi-byte title?

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Keith Spainhour <[email-masked]>
Date: Tue, 17 Jul 2001 08:58:40 -0400

$LANG = en_US.ISO8859-1

I did an unsetenv LANG. -- No change in title.
I did a setenv LANG (to nothing) -- No change in title.
I did an unset LANG - No change in title.

No matter what I did I still see the >(B chars.

I tried recompiling. No change.

Any other thoughts?  Was your testing on a Solaris 8
box?

---

From: Keith Spainhour <[email-masked]>
Date: Tue, 17 Jul 2001 09:02:57 -0400

Ah!!! I found it!!

I need to do the following:

unsetenv LANG
unsetenv LC_CTYPE

Then it works!!!

So, where do we go from here?  Do I need to persue this with Sun
or would you guys be a better choice?

Are we sure this is a Java issue?

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 17 Jul 2001 13:17:54 +0000

> code that produced the image listed in my previous email.

With the updated source I get the correct title without >(B prefix.
I even tried some valid values of LANG as Tim suggested with no effect.
I may reproduce a prefix in recent gnome apps with some LANG or LC_ALL.

This may be related to the fact that I (and Brad) have jdk-1.3, while you
use more recent version. Also with my swing 1.3, setSize has no effect.

Can you try java 1.3 by a chance? It does not seem to use locale.

Please configure fvwm with --enable-multibyte and report results.

Regards,
Mikhael.

---

From: Dan Espen <[email-masked]>
Date: Thu, 19 Jul 2001 08:26:43 -0400

> Are we sure this is a Java issue?

I've done some more testing.
I'm using Solaris 8.

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 its 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.

---

From: Keith Spainhour <[email-masked]>
Date: Thu, 19 Jul 2001 09:20:33 -0400

OK, Dan, thanks!  Would the FVWM organization like to file this
bug with Sun?  Ya'll may get a better response than me.  If not,
I'll file a bug and I'll send ya'll the bug number.

Let me know,

---

From: Dan Espen <[email-masked]>
Date: Thu, 19 Jul 2001 09:43:38 -0400

> I'll file a bug and I'll send ya'll the bug number.

The FVWM organization consists of anyone willing to help.

If you are willing, then, please file the bug report.

---

From: Keith Spainhour <[email-masked]>
Date: Thu, 19 Jul 2001 10:16:40 -0400

OK. i'll file a bug and let you know how it goes.