javatextutf-8codepageswindows-1256

ANSI value of RTL character


I want to know the ANSI value of the character "\u202B" that make RTL alignment in the text file, the problem that I've used it in UTF8 file and it makes the text RTL but when the text file is ANSI it shows marks "???" that means that this character not identified, so any one can know what's the opposite code for this character in ANSI?


Solution

  • Windows-1256 is the "ANSI code page" if the system locale is set to Arabic. A misnomer, but that what is called by all MS documentation... In the Windows world "ANSI code page" should read "system code page"

    Anyway, U+202B has no equivalent in in windows-1256. You can probably achieve what you need with

    U+200E  LEFT-TO-RIGHT MARK    0xFD in windows-1256
    U+200F  RIGHT-TO-LEFT MARK    0xFE in windows-1256