Fix crash when input multi-byte character by some input, update scopes a...

issue: [bug info](https://api.textmate.org/crashes/251994)

bug info
```
Application Specific Information:
text size: 7, line is valid utf-8: YES, 2 scope(s): 0-5
range 0-5 is not UTF-8:
0000 61 E9 81 87 E5 AE B3                            a......         
```
my input(wubi) : [baidu wubi input download](http://shouji.baidu.com/download/1000e/baiduinput_mac_v3.3_1000e.dmg) 

`ajmpd`  ----> wubi input --- output ---> `a遇害` (utf-8)

so input length is 5, replace text length is 7
in wubi input, only click `jmpd` without other key, it will output `遇害`