basic question about text file encodings

2015-04-16 Thread Laeeth Isharc via Digitalmars-d-learn
What is the best way to figure out and then decode a file of unknown coding to dchar? 2½% Index-linked Treasury Stock 2016,GB0009075325,26-Jul-2016,28-Feb-2014,8 month,337.81,338.577874,0.76787400,-1.953546,2.37 Eg I am not sure what encoding the 1/2 is in above, but treating it as

Re: basic question about text file encodings

2015-04-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 16 April 2015 at 19:22:41 UTC, Laeeth Isharc wrote: What is the best way to figure out and then decode a file of unknown coding to dchar? You generally can't, though some statistical analysis can sometimes help. The encoding needs to be known through some other means to have a

Re: basic question about text file encodings

2015-04-16 Thread Kagamin via Digitalmars-d-learn
First try utf-8, if it doesn't work, then use some fallback encoding like latin1.