Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 1996 11:56:07 +0900
From:      =?ISO-2022-JP?B?GyRCRURDZkh+SmY7UhsoQg==?= <mihoko@pa.yokogawa.co.jp>
To:        ache@nagual.ru
Cc:        freebsd-hackers@FreeBSD.org, XFree86@XFree86.Org, kimura@pa.yokogawa.co.jp
Subject:   Re: LC_CTYPE & XwcDrawString() trouble in FreeBSD-2.1.0R
Message-ID:  <199607180256.LAA02254@sapphire.pa.yokogawa.co.jp>
In-Reply-To: Your message of "Thu, 18 Jul 1996 00:40:04 %2B0400 (MSD)"
References:  <199607172040.AAA02479@nagual.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
ache> > The 'XwcDrawString()' function of X library can not draw strings
ache> > under LANG=lt_LN.ISO_8859-1 environment.
ache> 
ache> Wide characters not needed to represent 8859-1, it seems that your
ache> problem is that XFree86-3.1.2 not have aliases for FreeBSD locale names,
ache> i.e., FreeBSD locale name is:
ache> 
ache> lt_LN.ISO_8859-1
ache> 	 ^
ache> while XFree86 locale name is
ache> 
ache> lt_LN.ISO8859-1
ache> 

I'm sorry for my poor description. 
Perhaps you can not understand what I mean.

The trouble is that I can't draw text by using the drawing function for
*wide* caracters, 'XwcDrawString()'.
I can draw text by using the drawing function for *multi-bytes*
characters, 'XmbDrawString()'.
Of course, I add 'lt_LN.ISO_8859-1'as an alias data to the locale
database file of X, '/usr/X11R6/lib/X11/locale/locale.alias'.

The locale database of XFree86 ,exactly X Consortium,
hopes that it is the EUC code for ISO 8859-1. 

That is :

$ cat XF86312E/xc/nls/X11/locale/XLC_LOCALE/iso8859-1
XCOMM  $XConsortium: iso8859-1,v 1.3 94/01/22 14:06:36 rws Exp $
XCOMM  XLocale Database Sample for iso8859-1.
XCOMM 

XCOMM 
XCOMM   XLC_FONTSET category
XCOMM 
XLC_FONTSET
XCOMM   fs0 class 
fs0     {
        charset         ISO8859-1:GL
        font            ISO8859-1:GL
}
XCOMM   fs1 class 
fs1     {
        charset         ISO8859-1:GR
        font            ISO8859-1:GR
}
END XLC_FONTSET

XCOMM 
XCOMM   XLC_XLOCALE category
XCOMM 
XLC_XLOCALE

encoding_name           ISO8859-1
mb_cur_max              1
state_depend_encoding   False
#if WCHAR32
wc_encoding_mask        \x30000000
wc_shift_bits           7
#else
wc_encoding_mask        \x00008080
wc_shift_bits           8
#endif

XCOMM   cs0 class
cs0     {
        side            GL:Default
        length          1
        wc_encoding     \x00000000
        ct_encoding     ISO8859-1:GL
}


XCOMM   cs1 class
cs1     {
        side            GR:Default
        length          1
#if WCHAR32
        wc_encoding     \x30000000
#else
        wc_encoding     \x00008080
#endif
        ct_encoding     ISO8859-1:GR
}

END XLC_XLOCALE

Of course, I know that it does not need to use X{mb|wc}DrawString()
and that it does not need to handle text as wide characters because
we can draw text of ISO 8859-1 charactor set by using XDrawString().

I'm developping some applications which run in the multi-lingual
environment.
I use the EUC code as all charactor code for handling all
languages in common with Japanese. So I use XwcDrawString().

The X locale Database of X Consortium is a sample all right, but
I guess that it is the general implementation of the operating
system that using wide characters as EUC code in ISO 8859-1.

Is my idea wrong ? Please advice me.

Thank you in advance,
--
Mihoko Tanaka
<mihoko@pa.yokogawa.co.jp>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607180256.LAA02254>