Turkish Character problem ( Streamwriter )



Hi everyone..I want to write 'o' , ' ' , 'u' and 'c' characters to a .rtf file.and I want to use StreamWriter for writing and StreamReader for reading..But when i use StreamWriter and send one of the Turkish character, in the .rtf file there becomes a character like "A ".. what must i do_ and i think i must use "iso 8859-9" encoding..




Answer this question

Turkish Character problem ( Streamwriter )

  • Mystagogue

    now further i have an extention of this problem and that is i am querying SQL server and Oracle but whenever turkish "i" comes in between any word the query gives an incorrect result. In this senorio what can i do

  • BGood

    dear can you tell me how can i recognize if i want to use the character "i" of turkish language in c++. You know i am not able to differential between its small and block character. It is same in shape but litle bit different in size. can you suggess me any solution of it....

  • Andrea Montanari

    hi.. you can find byte code of the Turkish letter "i" at this page http://www.microsoft.com/globaldev/reference/sbcs/1254.mspx
    then you can use FileStream's Write function..

    FileStream fsTarget = new FileStream (target,FileMode.CreateNew,FileAccess.Write);
    fsTarget.WriteByte(305); // 305 is the byte code of Turkish "i"

    hope it works..


  • ccondit

    ok i solve the problem..
    new StreamWriter(@"c:\windows\soner.rtf",true,Encoding.Unicode)
    solved it..


  • Turkish Character problem ( Streamwriter )