Maybe call charCodeAt once instead of twice? Something like:

```coffeescript
char = text.charCodeAt(i)
char = @_winAnsiMap[char] || char
```