Question: Write a Java program that copies the given input file arabic.txt to an output text-file. Hint: Create a scanner object that reads from a UTF-8
Write a Java program that copies the given input file arabic.txt to an output text-file. Hint: Create a scanner object that reads from a UTF-8 encoded text-file by: FileInputStream instream = new FileInputStream("arabic.txt"); Scanner fileScanner = new Scanner(instream, "UTF-8"); Create a PrintWriter object that creates a UTF-8 encoded text-file by: PrintWriter pwriter = new PrintWriter("output.txt","UTF-8"); The created file will have left to right text-direction, to view the text in right to left direction, open the file using Notepad, right click on Notepad window and click Right to left Reading order:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
