Re: how to type non latin in xterm?; video stream to watch FIFA World Cup?

Previous thread: Tecnologia educativa: multimedia el estimulo para el conocimiento by Computerland on Monday, June 7, 2010 - 12:21 pm. (1 message)

Next thread: free binary search tree by Mark Bucciarelli on Monday, June 7, 2010 - 2:02 pm. (3 messages)
From: Sviatoslav Chagaev
Date: Monday, June 7, 2010 - 3:16 pm

Hi misc@

I want to be able to type non latin characters in xterm (Russian and
Latvian).
I sat down, read xterm manpage and tried playing with all the options
which even remotely looked like they could influence something.
But the only thing I managed to get working is xterm displaying UTF-8
correctly.

Here's my ~/.Xdefaults:

XTerm*loginShell: true
XTerm*useClipping: false
XTerm*geometry: 119x38
XTerm*termName: xterm-xfree86
XTerm*scrollBar: false
XTerm*rightScrollBar: true
XTerm*colorMode: true
XTerm*colorBDMode: false
XTerm*boldColors: true
XTerm*boldMode: true
XTerm*cutNewline: false
XTerm*cutToBeginningOfLine: false
XTerm*trimSelection: true
XTerm*internalBorder: 2
XTerm*Font: -*-terminus-medium-*-*-*-14-*-*-*-*-*-iso10646-1
XTerm*Foreground: rgb:cc/cc/cc
XTerm*Background: black
XTerm*locale: false
XTerm*utf8: 2
XTerm*deleteIsDEL: true
XTerm*eightBitInput: true


export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_TIME=en_US.UTF-8
export LC_COLLATE=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_MESSAGES=en_US.UTF-8
export LC_PAPER=en_US.UTF-8
export LC_NAME=en_US.UTF-8
export LC_ADDRESS=en_US.UTF-8
export LC_TELEPHONE=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8
export LC_IDENTIFICATION=en_US.UTF-8
export LC_ALL=en_US.UTF-8
xterm

Didn't help too.

The annoying thing is that when I start vim in xterm, I *can* type in
any language with no problem.

export LANG=en_US.UTF-8 LC_ALL

Is it possible to enable non latin input in xterm somehow?

---

And while I'm here, do you know of any video stream of some channel or
something which mplayer (or something from ports) could play and where
they'll show FIFA World Cup? My TV receives badly, with a lot of noise,
so I thought that maybe even an internet stream could be better, plus I
want commentaries in English.

From: Sviatoslav Chagaev
Date: Monday, June 7, 2010 - 3:19 pm

Disregard that line =)

From: Tomas Bodzar
Date: Monday, June 7, 2010 - 3:40 pm

Just start uxterm(1) and you will be much more happy. And luit(1) is
good candidate for reading too.


From: Sviatoslav Chagaev
Date: Tuesday, June 8, 2010 - 2:35 pm

Thanks for the reply. Yeah, this works too, but also partially: when I 
set -o emacs
in ksh, I can't input non-latin chars, so I have to
set +o emacs-usemeta
and it becomes basically the same as in Rune Lynge's post.

Ugh, forget it. I guess I'll just shut up, since I'm not up to

From: Tomas Bodzar
Date: Tuesday, June 8, 2010 - 12:34 pm

I use vim from uxterm where I simply set UTF-8 and then setxkbmap and
everything is fine. At least with Czech language :-)


From: Rune Lynge
Date: Tuesday, June 8, 2010 - 2:51 am

Hi Sviatoslav,



Are you using ksh in emacs editing mode? A  'set +o emacs-usemeta'
might help you.

Note that UTF-8 locale support in OpenBSD is ... well, waiting for
diffs, afaik; see
<http://kerneltrap.org/mailarchive/openbsd-misc/2007/11/2/380315/thread>.
But setting a LC_CTYPE will bring you some of the way depending on
your selection of applications.

Best regards,
Rune

From: Sviatoslav Chagaev
Date: Tuesday, June 8, 2010 - 2:30 pm

Thanks for the reply. Yup, ksh in emacs mode. It does indeed work, but
partially, meaning that when I type something, some letters appear as
empty squares: http://img541.imageshack.us/img541/2549/0060c.jpg
(same thing with Liberation Mono font)

From the ksh manpage:

emacs-usemeta    In emacs command-line editing, use the
                 8th bit as meta (^[) prefix.  This is the default.


From: Vadim Zhukov
Date: Tuesday, June 8, 2010 - 8:19 pm

See here: http://www.openbsd.ru/docs/howto-cyrillic.html#xterm

Basically, you need:
1. echo "set +o emacs-usemeta" >>~/.profile
2. echo "XTerm*allowC1Printable: true" >>~/.Xdefaults

--
  WBR,
  Vadim Zhukov

From: Vadim Zhukov
Date: Tuesday, June 8, 2010 - 9:40 pm

I forgot that xterm doesn't start login shell by default, so
~/.profile will not be called. The easiest way to fix this will be:

echo "XTerm*loginShell: true" >>~/.Xdefaults

The only bad side effect is wtmp spam as xterm will log every time it starts.

--
  WBR,
  Vadim Zhukov

From: Kenneth Gober
Date: Wednesday, June 9, 2010 - 1:14 pm

you can avoid the wtmp spam by doing this instead:
1. echo "export ENV=~/.kshrc" >>~/.profile
2. echo "set +o emacs-usemeta" >>~/.kshrc
3. echo "XTerm*allowC1Printable: true" >>~/.Xdefaults

doing this, xterm won't invoke ~/.profile, but it *will* invoke ~/.kshrc

-ken

From: Paolo Aglialoro
Date: Thursday, June 10, 2010 - 2:22 am

Hello,

I was myself trying to figure out how to use both unicode and cyrillic in
openbsd but, surfing the net, I haven't yet found a working howto on the
matter. Trying to alter LANG or LC_ALL has just sorted out complains from
the os during login, but no effect (actual locale is still "C").

Basically I do not need anything particular like emacs (I'm using openbsd on
i386), just need to see filenames with the correct characters and, if
needed, to type them with a key combination that changes keyboard layout
when using CLI.

Things, at the moment, just work under X, where (WM: xfce, for browsing:
opera) I can switch layouts (even if fots for cyrillic are not the best I've
ever seen so I'd also like to add better ones), so the problem is mostly
about CLI when no X is running.

I have found on the internet these two links on the topic:

http://www.in-ulm.de/~mascheck/locale/
http://www.pubbs.net/openbsd/200910/3886/

But they didn't help me a lot.
Any clues?

Thanks a lot
Paolo





Previous thread: Tecnologia educativa: multimedia el estimulo para el conocimiento by Computerland on Monday, June 7, 2010 - 12:21 pm. (1 message)

Next thread: free binary search tree by Mark Bucciarelli on Monday, June 7, 2010 - 2:02 pm. (3 messages)