utf-8

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
utf-8

Submitted by podifferoo on Thu, 04/15/2004 - 17:44.

Are there any plans to get UTF-8 support in OpenMotif? I have a small patch, that adds UTF-8 to the XmFONTLIST, but I think this might be not enough.
The patch is applies to the latest OpenMotif 2.2.3 beta release (2004-03-04).

--- openMotif-2.2.3/tools/wml/UilSymCSet.h.utf8 2004-03-04 17:41:48.000000000 +0100
+++ openMotif-2.2.3/tools/wml/UilSymCSet.h 2004-03-17 12:54:23.000000000 +0100
@@ -32,6 +32,7 @@
"JISX0201.1976-0", /* jis_katakana */
"KSC5601.1987-0", /* ksc_hangul */
"KSC5601.1987-1", /* ksc_hangul_gr */
+ "UTF-8", /* utf-8 */
};
externaldef(uil_sym_glbl) char **charset_xmstring_names_table =
charset_xmstring_names_table_vec;
@@ -66,6 +67,7 @@
XmSTRING_DIRECTION_L_TO_R, /* jis_katakana */
XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul */
XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul_gr */
+ XmSTRING_DIRECTION_L_TO_R, /* utf-8 */
};
externaldef(uil_sym_glbl) unsigned char *charset_writing_direction_table =
charset_wrdirection_table_vec;
@@ -100,6 +102,7 @@
XmSTRING_DIRECTION_L_TO_R, /* jis_katakana */
XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul */
XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul_gr */
+ XmSTRING_DIRECTION_L_TO_R, /* utf-8 */
};
externaldef(uil_sym_glbl) unsigned char *charset_parsing_direction_table =
charset_parsdirection_table_vec;
@@ -134,6 +137,7 @@
sym_k_onebyte_charsize, /* jis_katakana */
sym_k_twobyte_charsize, /* ksc_hangul */
sym_k_twobyte_charsize, /* ksc_hangul_gr */
+ sym_k_onebyte_charsize, /* utf-8 */
};
externaldef(uil_sym_glbl) unsigned char *charset_character_size_table =
charset_charsize_table_vec;
@@ -215,6 +219,7 @@
"KSC_HANGUL_GL", /* ksc_hangul */
"KSC_HANGUL_GR", /* ksc_hangul_gr */
"KSC5601.1987-1", /* ksc_hangul_gr */
+ "UTF-8", /* utf-8 */
};
externaldef(uil_sym_glbl) char **charset_lang_names_table =
charset_lang_names_table_vec;
@@ -295,10 +300,11 @@
sym_k_ksc_hangul_charset,
sym_k_ksc_hangul_gr_charset,
sym_k_ksc_hangul_gr_charset,
+ sym_k_utf8_charset,
};
externaldef(uil_sym_glbl) unsigned short int *charset_lang_codes_table =
charset_lang_codes_table_vec;
/*
* The number of entries in charset_lang_..._table tables
*/
-externaldef(uil_sym_glbl) unsigned short int charset_lang_table_max = 72;
+externaldef(uil_sym_glbl) unsigned short int charset_lang_table_max = 73;
--- openMotif-2.2.3/tools/wml/UilSymGen.h.utf8 2004-03-04 17:41:48.000000000 +0100
+++ openMotif-2.2.3/tools/wml/UilSymGen.h 2004-03-17 12:54:23.000000000 +0100
@@ -1417,6 +1417,7 @@
#define sym_k_jis_katakana_charset 21
#define sym_k_ksc_hangul_charset 22
#define sym_k_ksc_hangul_gr_charset 23
+#define sym_k_utf8_charset 24

/* Define literals for automatic children */

--- openMotif-2.2.3/tools/wml/motif.wml.utf8 2003-10-08 23:07:47.000000000 +0200
+++ openMotif-2.2.3/tools/wml/motif.wml 2004-03-17 12:56:09.000000000 +0100
@@ -163,6 +163,9 @@
ksc_hangul_gr
{ XmStringCharsetName = "KSC5601.1987-1";
CharacterSize = TwoByte; };
+ utf8
+ { XmStringCharsetName = "UTF-8"; };
+
XmFONTLIST_DEFAULT_TAG
{ FontListElementTag = XmFONTLIST_DEFAULT_TAG; };

Wed, 05/12/2004 - 14:04#1

Wed, 05/12/2004 - 14:04#1

Anonymous

UTF8

In fact, UTF 8 support requires considerable effort. It isnt just the case that you plonk Xutf8* routines into the XmString rendition code, and add Xutf8 font metric code into the XmFontList handling methods. You have to be thorough, and also make sure that ICCCM 2.0 specification updates for UTF* are handled in all aspects of inter-client communication, drag/drop, selections, and so forth. Basically, wherever TEXT components are transferable, you also have to be prepared to export/import in UTF8. This means that the convert/destination XmTransfer codes all need an update also.
And make sure that Motif supports the UTF8 ICCCM 2.0 Window Manager properties.

Technically, not difficult at all. The issue is one of rigorous application throughout the toolkit. And associated utilities.

This is mandatory for any Motif 2.3.

Fri, 12/30/2005 - 19:58#2

Fri, 12/30/2005 - 19:58#2

Mark

utf-8

UTF8 support is now in 2.3 beta.

 

Wed, 02/08/2006 - 21:50#3

Wed, 02/08/2006 - 21:50#3

podifferoo

Related Doc

For more information on UTF-8 support in OpenMotif 2.3, see the following whitepaper:
Anti-aliased Fonts and UTF-8 Support in OpenMotif 2.3