I want to create a text file with windows-1256 characters.
I writed this code:
StringBuffer buffer = new StringBuffer();
buffer.append((char)0xd1).append((char)0xd3).append((char)0xe5);
FileOutputStream stream = new FileOutputStream("c:\\t.txt");
OutputStreamWriter writer = new OutputStreamWriter(stream);
BufferedWriter bufferedWriter = new BufferedWriter(writer);
bufferedWriter.write(buffer.toString());
bufferedWriter.flush();
All things is ok except four persian characters : Gaf,Che,Peh,Ghe.
When i write this code,the out put result is : ????
buffer.append((char)0x90).append((char)0x8d).append((char)0x81).append((char)0x8e);
Can anyone help me?