On Thu, Jun 30, 2022 at 05:57:35PM +0000, Riza Dindir wrote:
> Hello Thomas,
>
> I have these lines in the .Xresources file.
>
> XTerm*faceName: Mono
> XTerm*faceSize: 10
> XTerm*vt100.locale: true
> !XTerm*vt100.font: *-*-*-*-*-*-18-*-*-*-*-*-iso8859-9
>
> The output from locale (after running xterm -u8)
>
> LANG=""
> LC_CTYPE="C"
> LC_COLLATE="C"
> LC_TIME="C"
> LC_NUMERIC="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=""
Then that's the problem. xterm uses the locale, but does not set it.
The "uxterm" script sets the locale before invoking xterm.
The xterm manpage gives a list of variables which it may set.
For instance:
XTERM_LOCALE
shows the locale which was used by xterm on startup. Some shell
initialization scripts may set a different locale.
> And the locale output when running xterm "as is" is
>
> LANG=""
> LC_CTYPE="C"
> LC_COLLATE="C"
> LC_TIME="C"
> LC_NUMERIC="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=""
>
> Riza
>
> On Thu, Jun 30, 2022 at 8:17 AM Thomas Dickey <dickey%his.com@localhost> wrote:
> >
> > On Thu, Jun 30, 2022 at 07:03:57AM +0000, Riza Dindir wrote:
> > > Hello Martin,
> > >
> > > If I change the LC_CTYPE environment variable, I would need to restart
> > > the xterm for the change to take effect?
> >
> > yes - xterm only checks that at startup.
> >
> > It would be helpful if your followup shows the output from the locale program.
> >
> > (will continue, this evening)
> >
> > > Riza
> > >
> > > On Wed, Jun 29, 2022 at 3:56 PM Martin Husemann <martin%duskware.de@localhost> wrote:
> > > >
> > > > On Wed, Jun 29, 2022 at 06:21:46PM +0000, Riza Dindir wrote:
> > > > > I also changed the font for XTerm in the Xresources file, which uses
> > > > > iso8859-9, but that does not do anything. Although the font changes,
> > > > > the characters for that language can not be entered on xterm.
> > > > >
> > > > > Is there a way to do that?
> > > >
> > > > You need to set the environment variable LC_CTYPE to e.g. de_DE.ISO8859-15
> > > > or de_DE.UTF-8 for german (the former giving you ISO 8859-15, the latter
> > > > UTF8 unicode encoding), or tr_TR.ISO8859-9 or tr_TR.UTF-8 for turkish.
> > > >
> > > > You can see all available locales in /usr/share/locale/.
> > > >
> > > > I don't know if the in-tree xterm supports unicode (I mostly use rxvt
> > > > or urxvt from pkgsrc instead), but nowadays most people would prefer
> > > > the UTF8 encoding. If you do not have legacy file names around, it doesn't
> > > > matter which you pick.
> > > >
> > > > Martin
> >
> > --
> > Thomas E. Dickey <dickey%invisible-island.net@localhost>
> > https://invisible-island.net
> > ftp://ftp.invisible-island.net
--
Thomas E. Dickey <dickey%invisible-island.net@localhost>
https://invisible-island.net
ftp://ftp.invisible-island.net
Attachment:
signature.asc
Description: PGP signature