Click here to Skip to main content
13,596,981 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello guys
I was writing a code that exract words from a text file one by one and making some modification ..etc .. but text file with arabic words is written from right to left and the peek() and read() methodes reads characters from left to right.
is there a solution for my issue ?
any suggestion is very appreciated thanks
Posted 31-Dec-12 11:26am
Sergey Alexandrovich Kryukov 31-Dec-12 17:41pm
Wow! Who taught you to "think" this way?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is a big conceptual misunderstanding.

There is no difference between left-to-right and right-to-left languages as the presentation of the text in the file is concerned. There is no such thing as "left" or "right" before you present the text as some page (control, screen, whatever). You cannot deny that in Arabic texts, the text flows from the "beginning" to the "end". From earlier moment of time to later moment of time. And so do the characters in a file. "Left" and "right" are totally insignificant. You read Arabic text from file in exact same way as English or any other.

Happy New Year!

PIEBALDconsult 31-Dec-12 18:23pm
I'm with you. It's not "left-to-right"; it's "beginning-to-end". Where on a display/page you put those is up to you. I would also state that even with English, if I display text "right-to-left", "top-to-bottom", or mirrored I would probably be understood.
Sergey Alexandrovich Kryukov 31-Dec-12 18:24pm
Exactly. Thank you.
ZangetsuZ 3-Jan-13 18:04pm
thanks a lot for your help guys .. I did not know that information sorry :(
Please, no need to apologize. It seems to me it just required some thinking. But I hope now you understand it, as you accepted the answer, thank you.
Best wishes in New Year,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180621.3 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100