Click here to Skip to main content
16,011,120 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Custom Collection Pin
darkelv18-Feb-08 17:01
darkelv18-Feb-08 17:01 
GeneralRe: Custom Collection Pin
Patrick Etc.18-Feb-08 18:54
Patrick Etc.18-Feb-08 18:54 
GeneralCustomizing web part title border in MOSS 2007. Pin
sdklfjlkdsfjdklsfjkdslfjdslkf18-Feb-08 2:58
sdklfjlkdsfjdklsfjkdslfjdslkf18-Feb-08 2:58 
QuestionECDsaCng elliptic curve class produces exception on import of private key Pin
Steve_K17-Feb-08 23:40
Steve_K17-Feb-08 23:40 
GeneralAdding new syntax highlighting Pin
barbq200017-Feb-08 2:55
barbq200017-Feb-08 2:55 
GeneralRe: Adding new syntax highlighting Pin
Pete O'Hanlon17-Feb-08 10:25
mvePete O'Hanlon17-Feb-08 10:25 
GeneralStreamWriter.WriteLine converting hex A0 to hex EF BF BD Pin
Mike Bluett16-Feb-08 13:46
Mike Bluett16-Feb-08 13:46 
GeneralRe: StreamWriter.WriteLine converting hex A0 to hex EF BF BD Pin
Guffa17-Feb-08 4:22
Guffa17-Feb-08 4:22 
Have you tried to simply specify the encoding when you open the reader and writer?
Encoding isoWesternEuropean = Encoding.GetEncoding(28591);
StreamReader htmFile = new StreamReader(HTM_FILE_PATH + fileName + ".htm", isoWesternEuropean);
StreamWriter tmpFile = new StreamWriter(HTM_FILE_PATH + "temp.php", APPEND, isoWesternEuropean);

If that doesn't work, the file that you are reading contains a byte order mark (BOM) that overrides the encoding. You can check this by adding the .bin extension to the file and open it in Visual Studio to examine the actual binary data in the file.

If it contains a BOM, the file is broken, as it contains information about decoding it that doesn't match how it was encoded. To fix this you would either have to use/write a program that removes the BOM, or open the file as a binary stream so that you can read past the BOM before starting to read the stream with the StreamReader.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: StreamWriter.WriteLine converting hex A0 to hex EF BF BD Pin
Mike Bluett17-Feb-08 8:13
Mike Bluett17-Feb-08 8:13 
GeneralRe: StreamWriter.WriteLine converting hex A0 to hex EF BF BD Pin
Guffa17-Feb-08 10:11
Guffa17-Feb-08 10:11 
GeneralDataGridTableStyle equivalent for DataGridView Pin
keniagm15-Feb-08 7:40
keniagm15-Feb-08 7:40 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
led mike15-Feb-08 7:56
led mike15-Feb-08 7:56 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
keniagm15-Feb-08 8:07
keniagm15-Feb-08 8:07 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
led mike15-Feb-08 8:15
led mike15-Feb-08 8:15 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
keniagm15-Feb-08 8:27
keniagm15-Feb-08 8:27 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
led mike15-Feb-08 9:05
led mike15-Feb-08 9:05 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
keniagm15-Feb-08 9:20
keniagm15-Feb-08 9:20 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
Member 1190124510-Mar-21 18:29
Member 1190124510-Mar-21 18:29 
GeneralRe: DataGridTableStyle equivalent for DataGridView Pin
Richard Deeming10-Mar-21 21:30
mveRichard Deeming10-Mar-21 21:30 
Question[Message Deleted] Pin
Ippacciani15-Feb-08 7:40
Ippacciani15-Feb-08 7:40 
GeneralRe: hashTable Pin
led mike15-Feb-08 8:04
led mike15-Feb-08 8:04 
GeneralRe: hashTable Pin
Kevin McFarlane15-Feb-08 10:45
Kevin McFarlane15-Feb-08 10:45 
GeneralRe: [Message Deleted] Pin
Luc Pattyn16-Feb-08 7:12
sitebuilderLuc Pattyn16-Feb-08 7:12 
GeneralSorted list Pin
KeesVer14-Feb-08 3:09
KeesVer14-Feb-08 3:09 
GeneralRe: Sorted list Pin
Pete O'Hanlon14-Feb-08 4:10
mvePete O'Hanlon14-Feb-08 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.