Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I have mandrake 10.1. While installing it, i chose support for both English and Arabic ( I have UTF-8 as default). When I open a file using vi, I get arabic letter written form left to right while they should be written from right to left.
Would anyone know how to fix this problem
thanks
Hmm. Maybe make an alias for another command? Do you mind typing a separate command for arabic and english files?
It looks like you can change modes in realtime (in vi) by typing (first to set right-to-left mode, second to unset it)
:set rl
:set norl
If that isn't to your liking, perhaps there's a program out there that detects if your files are arabic or english, and I could help you write a script to use that program, so that vi autodetects which one it should use.
I don't think it will autodetect for you and switch the mode for you, but try those commands, they're commands you type from within vi ":set rl" and ":set norl" - that at least lets you switch modes manually while you're editing a file.
Yes, that is working. I just have one more question. The file I mentioned is actually an English to Arabic dictionary. When I look up this file for words, will it know how to read them (L->R or R->L).
Thanks for your help
I assume so. I read somewhere that "right-to-left" text is still stored like it should be (the first symbol in a right-to-left text line is on the right, and stored file-wise at the beginning of the file, but the program that displays the line knows to display it right-to-left instead of left-to-right).
I would try it out with a couple of words and make sure it works though before you get too far!
Just for anyone who has the same issue. In the console, if you go to settings, then configure console, you can check "allow bidirectional text rendering". You will be able to read a language that read from left to right and another that reads from right to left in the same file.
I haven't tried reading from a file yet. I will have to check that out.
Thanks for your help .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.