String.charCodeAt() only returns UCS-2 characters (ie. regular 2 byte Unicode), encoded as UTF-8. The problem is that JS is not based on UCS-2. It is based on UTF-16, which is basically a superset of UCS-2 that can encode a number of ISO 10646 characters that are 3 or 4 bytes long. 

In order to properly get a full UTF-16 code point, you would need to use something like ilib.String.charCodeAt():

```
var istr = new ilib.String(content);
var firstCodePoint = istr.charCodeAt(0);
```