This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading a text file while controlling BIDI algorithm (visual BIDI)?

 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to read some text files, containing Left-To-Right text(Hebrew and Arabic, yet the two languages never appear in the same file).

Unfortunately, the files were written by some ancient homemade DOS program, some 20 years ago.
It used the following algorithm:
  • Char encoding : IBM CP 824 (Arabic) , IBM CP 826 (Hebrew).
  • Ordering: 'Visual BIDI Ordering' , i.e. foreign words are reversed, while numbers/English remain intact (Note it's not a simple GUI issue - the data was physically stored in reverse order).


  • Now, I was hoping to find a proper encoding, in the lines of:


    Unfortunately, I can't find a java-supported encoding that supports *both* the char encoding and the ordering...
  • encode="IBM862" produces the correct letters, but in wrong order
  • encode="ISO-8859-8" produces gibberish letters, but in correct order

  • Does anyone please happen to know - is there a supported encoding for "IBM862 Visual" ?
    If not - is there at least some reliable java implementation for "BIDI with visual (reversed) ordering" ?

    Thanks !
    [ May 03, 2007: Message edited by: Sol Mam-Orn ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic