Subject: FvwmScript and inputting UTF-8

From: Marcus Lundblad <[email-masked]>
Date: Fri, 16 Jan 2004 22:46:03 +0100 (CET)

FvwmScript seems to be broken when inputting text in UTF-8 locale.
Inputting characters within ASCII (first 127) works as expected, but
umlated characters and so on produces strange characters (and sometimes
just a rectangle, the font's "unknown" characters).
The font has the requested characters. I think there is something strange
going on as to how keyboard input is handled, maybe just one byte is read
for each keyboard event?

//Marcus 

--
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: Marcus Lundblad <[email-masked]>
Date: Sat, 17 Jan 2004 12:22:39 +0100 (CET)

> going on as to how keyboard input is handled, maybe just one byte is read

OK, I think I found where the problem is:

modules/FvwmScript/Widgets/TextField.c (line 522 onwards)

else if (i!=0)        /* Cas d'un caractere normal */
{
	/* Insertion du caractere dans le titre */
	/* a normal character: insertion in the title */
	Size=strlen(xobj->title);
		xobj->title=(char*)realloc(
		xobj->title,(2+Size)*sizeof(char));

	memmove(&xobj->title[NewPos+1],&xobj->title[NewPos],
		Size-NewPos+1);
		xobj->title[NewPos]=car[0];
		NewPos++;
		SendMsg(xobj,SingleClic);
}

No matter how many bytes are returned by XLookupString, only one byte
(the first) is inserted into the widgets textbuffer.
Also delete and moving (left, right) will need to be fixed.
Actually it will also not work with right-to-left text.

I think I will start to make it work for left-to-right text with no
combining characters in it (like the UTF-8-equivalent to ISO-8859-1/2
etc.)

Would this be filed as a "normal bug"?

//Marcus

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 19 Jan 2004 10:05:24 +0100

> Would this be filed as a "normal bug"?

Sure.  Actually, I don't understand exactly what a "anormal"
bug would be.

Ciao

Dominik ^_^  ^_^