utf8 and Text Widget - Motif

This is a discussion on utf8 and Text Widget - Motif ; Does anyone know how to display utf8 characters in a Motif Text Widget on HP-UX 11.0 ? I want to use the en_US.utf8 locale and my font is iso10646-1 encoded. The base page displays correctly (the ascii set) but character ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: utf8 and Text Widget

  1. utf8 and Text Widget

    Does anyone know how to display utf8 characters in a Motif Text Widget on
    HP-UX 11.0 ?

    I want to use the en_US.utf8 locale and my font is iso10646-1 encoded. The
    base page displays correctly (the ascii set) but character strings such as
    for Chinese display gibberish.

    What is the correct way to set the font list for the text widget? I only
    care about using this one font within the text widget.

    The 'xfd' program correctly displays the font.


    Thank you


  2. Re: utf8 and Text Widget

    On Thu, 05 Feb 2004 01:30:21 +0000, cregalia wrote:

    > Does anyone know how to display utf8 characters in a Motif Text Widget
    > on HP-UX 11.0 ?


    Select a UTF8 locale & properly I18N your application. Running in a CDE
    environment helps as well, since proper font resources are defined which
    result in appropriate fonts being loaded. CDE's text editor "dtpad" will
    load an appropriate set of fonts when the charset is UTF8.

    > I want to use the en_US.utf8 locale


    en_US.utf8 is not an HP-supplied locale. I would suggest using univ.utf8
    (see below).

    > and my font is iso10646-1 encoded.


    HP-UX does not use ISO 10646-1 fonts. Rather, it leverages existing fonts
    on the system.

    > The base page displays correctly (the ascii set) but character strings
    > such as for Chinese display gibberish.


    Unless you set locale to univ.utf8, you will only be able to display when
    isprint() in true for the given locale.

    > What is the correct way to set the font list for the text widget? I
    > only care about using this one font within the text widget.


    Specify a font set rather than a font or font list. This is done by CDE
    automatically, BTW. Look for font resources ending with a trailing ":".

    xrdb -q | grep -e ':$'



+ Reply to Thread