Problems using ä ö å as ascii characters in C# string to convert text file to PDF file

I am reading (using streamreader) from a txt file which is divided and written to multiple files (using streamwriter), these files are converted using AdultPDF Text To PDF. The original txt file is created in a unix system and copied to windows. I suspect it is written using ascii encoding because it converts fine with the swedish characters ä ö å to the PDF file usinf 'Text to PDF', but when I have divided the the file using an app created in VS2005 C# the output textfiles are fine when the encoding is default(unicode I believe). But when converting to PDF using 'Text to PDF' the output characters are 'Ã' instead of 'Ä' / 'Ã' instead of 'Ö' / 'Ã&' instead of 'Å' .
When I use ASCII encoding for the streamwriter I get the character '?' instead of the swedish characters both in the output txt and pdf file.

I use the commandline solution to convert the text file to PDF using 'Text to PDF' :

I have tried it on both a swedish and english version of windows.

I might be doing this all wrong, so I am happy to try any suggestions.

Thank you!
Who is Participating?
haveabunConnect With a Mentor Author Commented:
Thanks for the reply unfortenually it did not work with UTF8. But I have playing around with it for a while now. And have finally got it right. Encoding needs to be set as Encoding.Default for both StreamReader and StreamWriter.
Nirmalan NagenthiranCommented:
At the time of reading you can specify the Encoding.UTF8 in Streamreader and try
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.