Hello
I'm writing java code read arabic character but it don't show the text correctly it show squares Any one Can help me any help will be appreciated
Thanks

Yours
Ahmed Ghazey

Hello
I'm writing java code read arabic character but it don't show the text correctly it show squares Any one Can help me any help will be appreciated
Thanks

Yours
Ahmed Ghazey

Can I see your code please?

By Allah Willing I do it Thanks All and this is the code

public void unicodeShow(String fileName) throws UnsupportedEncodingException, FileNotFoundException, IOException{
        Reader reader = new InputStreamReader(new FileInputStream(fileName), "utf-8");
        BufferedReader br = new BufferedReader(reader);
        String a=br.readLine();
        System.out.println(a);
    }

by Ahmed Ghazey
FCI CU
Egypt

Edited 5 Years Ago by peter_budo: Adding code tags to old post

I see the thread is marked as solved.
If you have solved your problem, could you please post your solution so the next person with the same problem can find the solution here.
Thanks

Sorry I don't Understand you if You read my Comment You will see the Solution I put it when I get The Solution immediately
Thanks For Attention You are right but you must read all the Comments
Thanks Again
Yours
Ahmed Ghazey
FCI CU

It happends with Chinese characters as well. I think this is probably due to the computer system (windows' config) where your output is printed.

Edited 6 Years Ago by tong1: n/a

You can see the output in the any specific file, because some IDE not supported UTF-8 for text file encoding(Ex, in Eclipse go to the
Windows/Preferences/General/Workspace
In the Text file encoding
select in the Other the UTF-8 to change the encoding)

public static void writeTiFile(String fileName,String str){
        try {
            FileOutputStream out = new FileOutputStream(fileName);
            out.write(str.getBytes("windows-1256"));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

Edited 5 Years Ago by peter_budo: Adding code tags to old post

This question has already been answered. Start a new discussion instead.