jckarter/clay — pull request #309 by stepancheg (2012-08-06 19:07:45+00:00)
Title: use checked cast when converting to Char and to UniChar

Before this commit

```
UniChar(Char(-1))
```

resulted in UniChar(4294967295). This is definitely not what developer
wants. After this commit UniChar(Char(-1)) is integer overflow
error, and that's correct, because there is no single way to represent
non-ASCII Char values as Unicode characters.

And vice versa, before this commit

```
Char(UniChar(10000))
```

resulted in Char that does not represent original UniChar, so this
operation should also be integer overflow.

However, 8bit characters are often represented as UInt32 values in
range 0..256. For that case, Char(I) now has two overloads: for
signed integer and for unsigned integer parameter.