Link to home
Start Free TrialLog in
Avatar of AlHal2
AlHal2Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Replicate Textpad's file format setting

I've written a C# program to process a file.  It only works if I open the file in textpad and go to save as.  There are two options at the bottom of the dialogue.  They are file format and encoding.  I must change the file format from "no change" to "PC".  
What's the difference between the two formats?
How can I achieve this programmatically?
I'm using C# for windows programming with visual studio 2008.
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

When your program doesn't work, is it throwing any exception? If so, can you post that?
Avatar of AlHal2

ASKER

It's inputting the first line and ignoring subsequent lines.  I opened the input file in hexedit.  It seems like the lines are ending with characters 13,10,13 instead of 13,10.
13=carriage return.  10= line feed.
Can you attach both files, one of them "as is" and another one saved in TextPad? So I can see the differences between them and see if there's any way in .Net to replicate that...
Avatar of AlHal2

ASKER

Please take a look.
RawFile.txt
RawFileAfterTextpad.txt
Avatar of AlHal2

ASKER

Please ignore rawfileaftertexpad.txt.
Compare rawfile.txt with rawfileaftertextpad2.txt which I'm just attaching.  Sorry for the confusion.
RawFileAfterTextpad2.txt
Avatar of AlHal2

ASKER

Please let me know if anything is unclear.
ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlHal2

ASKER

Thanks.