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' : http://www.adultpdf.com/products/txttopdf/index.html

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!
 
haveabunAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nirmalan NagenthiranCommented:
At the time of reading you can specify the Encoding.UTF8 in Streamreader and try
0
haveabunAuthor 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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.