Click here to Skip to main content
15,896,545 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

i m creating simple app for file processing
i m getting problem when i m reading line like this "Validation by SGS Société Générale de Surveil"
it is writing in out put line like "Validation by SGS Société Générale de Surveill"
é is converting to é ...

i want to write as it is what i m reading that is "été" but not "éé" insted

please help me to fix this
Posted
Updated 4-Apr-11 23:16pm
v2
Comments
Sandeep Mewara 5-Apr-11 4:51am    
Not clear. Can you please elaborate?
Sandeep Mewara 5-Apr-11 4:51am    
Second thought:
BTW, your font families for both available such that they can be used?
shrikant003 5-Apr-11 5:22am    
i want to write as it is what i m reading that is "été" but not "éé" insted

What is your issue? That output looks perfect all accents are OK. What are your expectations regarding the output?

Please explain?

[Added example]

C#
public:

      String* filename = "your file name here";

      FileStream* fs = new FileStream(fileName, FileMode::CreateNew, FileAccess::Write, FileShare::None);
      StreamWriter* swFromFileStreamASCIIEnc = new System::IO::StreamWriter(fs, System::Text::Encoding::ASCII);

      swFromFileStreamDefaultEnc->Write("éé");
      swFromFileStreamDefaultEnc->Flush();
      swFromFileStreamDefaultEnc->Close();
 
Share this answer
 
v3
Comments
shrikant003 5-Apr-11 5:15am    
i want to write as it is what i m reading that is "été" but not "éé" instead
Manfred Rudolf Bihy 5-Apr-11 6:02am    
So how do you know that the editor you're reading it in is displaying it correctly? The characters from your file look like ASCII encoded UTF characters. If you want the processed file to appear the same way try to write it with System.Text.Encoding.ASCII encoding.
shrikant003 5-Apr-11 6:20am    
i m using vc++... not .net c++
Manfred Rudolf Bihy 5-Apr-11 6:57am    
Since you seem to be too lazy to google this for yourself: http://blog.kalmbachnet.de/?postid=105
Besides that if you had posted the relevant code bits of what you've written it would already be solved by now.
Think about that!
Looks like the editor and the compiler are treating Unicode with different encoding: like "you save your source as extended ASCII with Westren codepage, and the compiler read it as UTF8".

Check the file save setting and the compiler options, and make them coherent.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900