Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

Lynx - how to make it to show hebrew text correctly?

Sun Jun 26, 2016 10:57 pm

it shows it flipped

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 1:12 am

Flipped as in how? Unicode is somewhat hard with text/Dos style browsers and other programs. Are you using it with an install of Rasbian with a gui, or using Rasbian Lite?
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Heater
Posts: 13874
Joined: Tue Jul 17, 2012 3:02 pm

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 3:37 am

As far as I know Hebrew is written from right to left, not left to write. Unicode supports this but I wonder if all programs using Unicode do. Does Lynx even support such backwards languages?

This Unicode thing is a disaster and can get you into all kinds of a mess.

Like this perfectly valid, but bizarre looking Javascript with Hebrew variables:

Code: Select all

// An object with Hebrew name "א" (Alef)
var א = {};

// Set a property on א called ב (Bet)
א.ב = 7

// Display the ב property
console.log(א.ב);
Memory in C++ is a leaky abstraction .

User avatar
DougieLawson
Posts: 36540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 12:05 pm

Fght wrote:it shows it flipped
Set

Code: Select all

display_rotate=0x20000
reboot and see how that works for you.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Heater
Posts: 13874
Joined: Tue Jul 17, 2012 3:02 pm

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 12:23 pm

I do hope that was said jest Dougie.
Memory in C++ is a leaky abstraction .

User avatar
scruss
Posts: 2615
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 3:41 pm

Fght wrote:it shows it flipped
Yes, it does:
Screenshot from 2016-06-27 11-27-03.png
shalom ḥaverim in standard terminal
Screenshot from 2016-06-27 11-27-03.png (2.89 KiB) Viewed 2072 times
When it should look a little more like:
Screenshot from 2016-06-27 11-27-16.png
shalom ḥaverim in mlterm
Screenshot from 2016-06-27 11-27-16.png (2.51 KiB) Viewed 2072 times
See how the Final Mem characters (the m's in shalom ḥaverim) are on the left, rather than the right.

While lxterminal might support RTL text, it seems to be less keen on mixing LTR with RTL (aka ‘bidi’ support). Luckily, mlterm handles this. Try installing these:

Code: Select all

sudo apt install mlterm unifont xfonts-efont-unicode fonts-vlgothic  fonts-nanum fonts-baekmuk fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp t1-cyrillic mlterm-im-uim mlterm-im-m17nlib mlterm-im-scim
Then open an mlterm:

Code: Select all

mlterm &
and then try this web page from that new terminal:

Code: Select all

lynx 'http://aharon.varady.net/browser-test/index.html'
Please let me know how you get on. Languages are difficult, and computers haven't quite caught up. UTF makes things much better for many users, though.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Heater
Posts: 13874
Joined: Tue Jul 17, 2012 3:02 pm

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 5:29 pm

Interesting. When I view that page in Lynx in the Konsole terminal of KDE it seems to come out correctly. At least it looks the same as Chrome:
Attachments
hello-friends.png
hello-friends.png (4.85 KiB) Viewed 2035 times
Memory in C++ is a leaky abstraction .

User avatar
scruss
Posts: 2615
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 5:37 pm

Heater wrote:Interesting. When I view that page in Lynx in the Konsole terminal of KDE it seems to come out correctly.
Yes, Konsole seems to have bidi support, at least according to Web browser Testing for Unicode Hebrew and Diacritical Mark Positioning: CSS @font-face Test Results.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
DougieLawson
Posts: 36540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Lynx - how to make it to show hebrew text correctly?

Mon Jun 27, 2016 6:54 pm

Heater wrote:I do hope that was said jest Dougie.
Did I miss adding the smiley? :mrgreen: :mrgreen: :mrgreen:
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

Re: Lynx - how to make it to show hebrew text correctly?

Tue Jun 28, 2016 7:44 pm

DougieLawson wrote:
Fght wrote:it shows it flipped
Set

Code: Select all

display_rotate=0x20000
reboot and see how that works for you.
do you mean to edit the lynx.cfg file and change what you said?

when i open it with nano it is empty (non existed file)

Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

Re: Lynx - how to make it to show hebrew text correctly?

Tue Jun 28, 2016 7:51 pm

scruss
i'm trying your suggestion now

edit:

i've tried it but now it only shows rectangles instead of letters

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Lynx - how to make it to show hebrew text correctly?

Tue Jun 28, 2016 9:01 pm

Fght wrote:
DougieLawson wrote:
Fght wrote:it shows it flipped
Set

Code: Select all

display_rotate=0x20000
reboot and see how that works for you.
do you mean to edit the lynx.cfg file and change what you said?
when i open it with nano it is empty (non existed file)
Your original comment seemed to me as well that you were saying the characters were presented upside down. But as is now clear, the issue is one of right to left being rendered as left to right. Before I worried about that, I'd be trying to figure out why the font is so tiny I couldn't even make out the characters. What's the deal with that?

User avatar
DougieLawson
Posts: 36540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Lynx - how to make it to show hebrew text correctly?

Tue Jun 28, 2016 11:56 pm

Fght wrote:
DougieLawson wrote:
Fght wrote:it shows it flipped
Set

Code: Select all

display_rotate=0x20000
reboot and see how that works for you.
do you mean to edit the lynx.cfg file and change what you said?

when i open it with nano it is empty (non existed file)
That goes in /boot/config.txt and will cause the whole display to be flipped vertically.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
scruss
Posts: 2615
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Lynx - how to make it to show hebrew text correctly?

Wed Jun 29, 2016 4:25 am

Fght wrote:i've tried it but now it only shows rectangles instead of letters
Yes, I'm trying to work out which fonts I installed to make it work. They're not on a stock Raspberry Pi.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Fght
Posts: 319
Joined: Thu Feb 05, 2015 10:26 pm

Re: Lynx - how to make it to show hebrew text correctly?

Fri Jul 01, 2016 8:31 pm

thanks anyway....

i did initially looked for a very easy solution.....

Return to “General discussion”