[Mono-list] conversions

Jonathan Pryor jonpryor@vt.edu
Fri, 24 Sep 2004 07:13:17 -0400


On Fri, 2004-09-24 at 06:34, Richard Polton wrote:
<snip/>
> So, my question is, is it a requirement of all 
> .NET (and Mono) applications that the character set used is ASCII or 
> similar?

The character set inside of Mono/.NET is Unicode, in particular UTF-16,
native-endian.  ASCII is a subset of Unicode; that is, the first 127
glyphs of Unicode match ASCII.

> I know the spec refers to the program as being encoded in 
> Unicode but I couldn't find anything regarding the recognisable input chars.

I'm not sure what you mean by "recognizable input chars".  Any program
input (via file, terminal, or GUI app) should be converted by the
runtime before your program ever manipulates it (encoding conversion is
part of the marshaling layer).

There are exceptions, but only when you deliberately avoid the default
behavior (for example, using a FileStream and using bytes directly,
instead of using the Reader and Writer classes to read/write to the
Stream). 

 - Jon