Hello Rich & PLUG,

I'm not sure if this topic was completed to Rich's satisfaction, so let me add something.

On Tuesday, 26 July 2016, Rich Shepard wrote:
My virtual terminals use urxvt and correctly display UTF-8 text encoding as demonstrated by viewing the UTF-8-demo.txt file. My MUA is alpine and invoked in a urxvt terminal. But, not all foreign languages are displayed; for example, Hebrew is seen as a series of question marks. This is one question I'd like to have answered, if possible.

I've been using PINE since the mid 90's and have run into this problem several times. In 2009, there was another discussion on the alpine-info list about it. The first attached message is from that discussion and includes a nice font test I have used many times since for testing. I'm not sure which UTF-8 demo you have. This one includes Hebrew and works for me in Alpine (in gnome-terminal, see below).

You should check out the alpine-info archives; I'm pretty sure the answers are there. But, here is what I have learned. The problem with UTF-8 characters is solved for almost all combinations. For example, I see the same characters in xterm using True-Type fonts with both Alpine and less. But the remaining problems are not related to UTF-8 encoding but 16-bit or "wide" characters commonly used in Chinese, Japanese, and Korean (CJK). Maybe Hebrew, too?

I don't receive any messages in Hebrew, but I receive a lot in Japanese. The trick is gnome-terminal. Alpine in gnome-terminal gives the best results. This is because Alpine passes the characters on to the terminal (mostly) unmolested and it's the terminal's job to finds the right glyph. Most chars even work in regular old xterm if you tell xterm to use nice, modern fonts ("liberation mono", for example). But, only gnome-terminal supports *variable width encoding.* (Not to be confused with variable with fonts, which regular old xterm supports using TTF.) So, try that.

A complete "true" solution is probably found by following the CJK users. I've investigated this myself once, but gave up since my current set-up is adequate. This, I assume, would work on the console, not just in terminal emulators (xterm,urxvt,gnome-terminal,etc.). I wonder what happens if you choose Chinese on a fresh install then use the input-chooser hot-keys to switch to English keyboard?

The second question probably relates to how alpine is configured. Or maybe not. When I compose an e-mail message the v.t. changes from urxvt to xterm. Might this have something to do with my specifying 'joe' as the text editor rather than 'nano'? This is another issue that's not critical but a matter of curiosity whether it can be explained.

I would use VIM or Emacs, for sure, but I don't think that is your problem.

What do you mean by v.t. "changes" from urxvt to xterm? For that matter, what do you mean by your v.t. "uses" urxvt? I think I'm missing something important here.

In the past, I tried many times so address font problems with urxvt as it seems pretty popular. But, in my testing, xterm is still superior now that it supports all the same fonts as, say, libreoffice or the desktop environment, itself.

Alpine is configured to display UTF-8 text and to use /usr/bin/joe as the editor. If there are options that address the above two questions then I missed them.

I've discussed this with Eduardo Chappa, myself, and there are some options that affect character passing/encoding between Alpine and the terminal. "Pass C1 control chars as is" for example, but I don't believe that affects this issue. You already have UTF-8 selected as the display char set, so that's the main thing.

--
Paul DeStefano
From alpine-(ta)-benizi(dot) com Mon Jan 12 18:55:59 2009
Date: Mon, 12 Jan 2009 21:50:12 -0500 (EST)
From: Benjamin R. Haskell <alpine-(ta)-benizi (dot)com>
To: [email protected]
Subject: Re: [Alpine-info] Foreign Characters?

On Mon, 12 Jan 2009, Dan Mahoney, System Admin wrote:

>>> c) screen/termcap
>
> I found that I had to do ctrl-a :utf8 on in the window running alpine. 
> Screen was still blocking it until I did this.  I now find that the last 
> character of your last name looks (to me) like a regular z, with "rabbit 
> ears" (I don't know the character name).  Is that right?

Yes, Andraž's name ends with a z with a caron (ž):
ž       017e    LATIN SMALL LETTER Z WITH CARON

(I've heard it more often called a háček (hacek) 
http://en.wikipedia.org/wiki/Hacek )


> Could someone with another name/text (preferably asian) send something 
> to me to check this with as well?

I've wanted for a very long time to be able to display more than just 
Eurocentric "foreign" characters inside a terminal that I could also use 
for my normal work (in English).  My guess is that your sticking point is 
going to be the font.  Something like Firefox will handle many scripts, 
because it will fall back to a different font depending on the character 
range.  As far as I know (which, several years ago, was pretty far, but I 
haven't been studying any languages lately), there aren't any terminals 
that handle that gracefully.  Mlterm was the only one I found that handled 
variable-width, right-to-left scripts (Arabic) in any decent manner, and 
was pretty good for both Chinese and Japanese.  Konsole may have come 
close, in terms of the font-mixing I'm looking for.  (But, it didn't work 
at all for Arabic.)

If you can find a font and/or terminal and/or terminal setup that handles 
many scripts at once, I'd be very interested in hearing about it.  Right 
now, in uxterm with Lucida Sans Unicode, I get nice Latin, Greek, and 
Cyrillic.  But, no CJK characters.

Best,
Ben



For reference, here is the first portion of the Universal Declaration of 
Human Rights in a handful of languages that use different writing systems:

Korean: (Hangul)
모든 인류 구성원의 천부의 존엄성과 동등하고 양도할 수 
없는 권리를 인정하는 
것이 세계의 자유 , 정의 및 평화의 기초이며

Modern Standard Arabic:
لمّا كان الاعتراف بالكرامة المتأصلة في جم
يع أعضاء الأسرة البشرية وبحقوقهم 
المتساوية الثابتة هو أساس الحرية والعدل 
والسلام في العالم.

Greek:
Επειδή η αναγνώριση της αξιοπρέπειας, που 
είναι σύμφυτη σε όλα τα μέλη της 
ανθρώπινης οικογένειας, καθώς και των ίσων 
και αναπαλλοτρίωτων δικαιωμάτων 
τους αποτελεί το θεμέλιο της ελευθερίας, 
της δικαιοσύνης και της ειρήνης 
στον κόσμο.

Russian: (Cyrillic)
Принимая во внимание, что признание 
достоинства, присущего всем членам 
человеческой семьи, и равных и неотъемлемых
 прав их является основой 
свободы, справедливости и всеобщего мира; и

Mandarin: (Han)
鉴 于 对 人 类 家 庭 所 有 成 员 的 固 有 尊 严 及 其 平 等 
的 和 不 移 的 
权 利 的 承 认, 乃 是 世 界 自 由、 正 义 与 和 平 的 基 础,

Japanese: (mixed, hiragana and kanji)
人類社会のすべての構成員の固有の尊厳と平等で譲ることのできない権利とを承認することは、世界における自由、正義及び平和の基礎であるので、

Hebrew:
כל בני האדם נולדו בני חורין ושווים בערכם 
ובזכיותיהם. כולם חוננו בתבונה 
ובמצפון, לפיכך חובה עליהם לנהוג איש ברעהו 
ברוח של אחווה.

    [ Part 2: "Attached Text" ]

_______________________________________________
Alpine-info mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/alpine-info
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to