Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Comparing various algorithms to convert GPS-coordinates to 2D-coordinates Pin
CrIpLeX25-Aug-10 2:00
CrIpLeX25-Aug-10 2:00 
GeneralRe: Comparing various algorithms to convert GPS-coordinates to 2D-coordinates Pin
Luc Pattyn25-Aug-10 2:27
sitebuilderLuc Pattyn25-Aug-10 2:27 
AnswerRe: Comparing various algorithms to convert GPS-coordinates to 2D-coordinates [modified] Pin
Peter_in_278024-Aug-10 11:39
professionalPeter_in_278024-Aug-10 11:39 
GeneralRe: Comparing various algorithms to convert GPS-coordinates to 2D-coordinates Pin
CrIpLeX25-Aug-10 2:01
CrIpLeX25-Aug-10 2:01 
AnswerRe: Comparing various algorithms to convert GPS-coordinates to 2D-coordinates Pin
Bernhard Hiller25-Aug-10 0:27
Bernhard Hiller25-Aug-10 0:27 
QuestionCharacter encoding when reading a text file of unknown encoding, to create an XML file Pin
JohnLBevan24-Aug-10 9:00
professionalJohnLBevan24-Aug-10 9:00 
AnswerRe: Character encoding when reading a text file of unknown encoding, to create an XML file Pin
Luc Pattyn24-Aug-10 9:52
sitebuilderLuc Pattyn24-Aug-10 9:52 
GeneralRe: Character encoding when reading a text file of unknown encoding, to create an XML file Pin
JohnLBevan24-Aug-10 22:33
professionalJohnLBevan24-Aug-10 22:33 
Hey Luc,

thanks for your response; adding the encoding fixed the issue. I am a little worried about the possibility of other codepages, since the idea is that this system can take data from any source. Guess I'll have to configure it to allow different data sources (i.e. file locations) to have a custom codepage specified.

For people following this thread, you may be interested in the code below, which gives the systems' default codepage (as Luc mentioned, for me it's 1252).
Console.WriteLine(Encoding.Default.CodePage.ToString());


I've now modified one line of my code to read as follows, which seems to have fixed the issue:
using (TextReader reader = new StreamReader(filename,Encoding.Default,true))


It seems a bit strange that the system's not using the default by default, but hey, all's good. I've also tried chucking UTF-8 and UTF-16 formatted text documents through and these were also encoded correctly.

Thanks again,

JB
QuestionStrange order of events in ListView with MultiSelect set to false Pin
crypto_rsa24-Aug-10 6:28
crypto_rsa24-Aug-10 6:28 
AnswerRe: Strange order of events in ListView with MultiSelect set to false Pin
Ravi Bhavnani24-Aug-10 8:17
professionalRavi Bhavnani24-Aug-10 8:17 
AnswerRe: Strange order of events in ListView with MultiSelect set to false Pin
DaveyM6924-Aug-10 10:16
professionalDaveyM6924-Aug-10 10:16 
GeneralRe: Strange order of events in ListView with MultiSelect set to false Pin
crypto_rsa24-Aug-10 21:37
crypto_rsa24-Aug-10 21:37 
GeneralRe: Strange order of events in ListView with MultiSelect set to false Pin
johannesnestler24-Aug-10 23:05
johannesnestler24-Aug-10 23:05 
AnswerRe: Strange order of events in ListView with MultiSelect set to false Pin
DaveyM6924-Aug-10 10:41
professionalDaveyM6924-Aug-10 10:41 
GeneralRe: Strange order of events in ListView with MultiSelect set to false Pin
crypto_rsa25-Aug-10 1:12
crypto_rsa25-Aug-10 1:12 
QuestionEditable datagridview Pin
saqib8224-Aug-10 5:37
saqib8224-Aug-10 5:37 
AnswerRe: Editable datagridview Pin
dan!sh 24-Aug-10 6:00
professional dan!sh 24-Aug-10 6:00 
GeneralRe: Editable datagridview Pin
saqib8224-Aug-10 6:07
saqib8224-Aug-10 6:07 
GeneralRe: Editable datagridview Pin
dan!sh 24-Aug-10 6:24
professional dan!sh 24-Aug-10 6:24 
GeneralRe: Editable datagridview Pin
saqib8224-Aug-10 6:39
saqib8224-Aug-10 6:39 
AnswerRe: Editable datagridview Pin
Mada Naga Sankar25-Aug-10 19:38
Mada Naga Sankar25-Aug-10 19:38 
Questionproblem with invoke method. it says cannot call invoke on a control until the window handle has been created Pin
prasadbuddhika24-Aug-10 4:59
prasadbuddhika24-Aug-10 4:59 
AnswerRe: problem with invoke method. it says cannot call invoke on a control until the window handle has been created Pin
Luc Pattyn24-Aug-10 5:32
sitebuilderLuc Pattyn24-Aug-10 5:32 
AnswerRe: problem with invoke method. it says cannot call invoke on a control until the window handle has been created Pin
Chris Trelawny-Ross24-Aug-10 5:34
Chris Trelawny-Ross24-Aug-10 5:34 
AnswerRe: problem with invoke method. it says cannot call invoke on a control until the window handle has been created [modified] Pin
DaveyM6924-Aug-10 9:14
professionalDaveyM6924-Aug-10 9:14 

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.