Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

windows-1256 character set problem

  Asked By: Manju    Date: Dec 11    Category: Java    Views: 1354
  

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?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Kristen Chavez     Answered On: Dec 11

Not sure but try to overwrite "file.encoding" environment variable and
test it again.

 
Didn't find what you were looking for? Find more on windows-1256 character set problem Or get search suggestion and latest updates.




Tagged: