Is there a native function to detect if file is UTF encoding?

2014-08-22 Thread MacAsm via Digitalmars-d
To call decode() from std.encoding I need to make sure it is an UTF (may ne ASCII too) otherwise is will skyp over ASCII values. Is there any D native for it or I need to check byte order mark and write one myself?

Re: Is there a native function to detect if file is UTF encoding?

2014-08-22 Thread Dejan Lekic via Digitalmars-d
On Friday, 22 August 2014 at 13:53:04 UTC, MacAsm wrote: To call decode() from std.encoding I need to make sure it is an UTF (may ne ASCII too) otherwise is will skyp over ASCII values. Is there any D native for it or I need to check byte order mark and write one myself? You may want to take

Re: Is there a native function to detect if file is UTF encoding?

2014-08-22 Thread Kiith-Sa via Digitalmars-d
On Friday, 22 August 2014 at 13:53:04 UTC, MacAsm wrote: To call decode() from std.encoding I need to make sure it is an UTF (may ne ASCII too) otherwise is will skyp over ASCII values. Is there any D native for it or I need to check byte order mark and write one myself? This may be simpler