[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2425.0. "CS Text widget and charset for input ?" by AITG::WILSON (Is this a bug hunt or is this a stand-up fight ?) Fri Mar 09 1990 16:10

	A simple question:  in the Compound String Text widget in the XUI
toolkit, what determines the charset that is used when the user types in
text from the keyboard ?  For output the answer is easy: the charset is
carried with the compound string itself and is matched with an entry in
the widget's font list.  But what about input of text ?  There's a resource
for specifying direction.  How is charset specified ?  A setting made from
XNLS ?
T.RTitleUserPersonal
Name
DateLines
2425.1Part of the answerR2ME2::MCOLLINSThu Mar 15 1990 12:1114

After digging around a bit, my sources tell me that since KeySyms are 
32 bit values they've been laid out so you can figure out the 
charset number. According to Page 506 in the purple "X Window System" 
book, byte 3 of the keysym indicates charset.

The CSText widget has a function which maps this charset code into
DECwindows type charset identifiers.

How this is switched I'm still trying to get an answer for.

	Mike Collins

2425.2Good info !AITG::WILSONIs this a bug hunt or is this a stand-up fight ?Fri Mar 16 1990 15:115
	I imagine the keysyms generated are determined by the keyboard type
selected from Session Manager customization.

	Thanks for the info, this isn't very obvious !
2425.3Not really trueHANJA::GREENWOODTim. Asian Base-SystemsMon Mar 19 1990 16:4222
>After digging around a bit, my sources tell me that since KeySyms are 
>32 bit values they've been laid out so you can figure out the 
>charset number. According to Page 506 in the purple "X Window System" 
>book, byte 3 of the keysym indicates charset.

This is misleading. A keysym is a unique identifier of a glyph. Characters
in character sets are not unique. Thus the glyph A has only one keysym, 
which indicates that it comes from Latin-1. However the character A appears in
many character sets,including all 9 parts of ISO 8859 and also in ideographic
sets such as JIS 208 (Kanji).

The keysyms were laid out by appending several charcater sets and eliminating 
duplicates in later sets. This gives an easy mapping from keysym to character
for many of the keysyms. However it was never intended that the bottom byte
of a keysym is defined as the character.

CSText was developed by DEC Israel. Since they are dealing with the Hebrew and
Latin characters, which have no intersection this trick works. However it is
not robust and should be changed to have the language indicated some other
way.

Tim