uint8array implementation

1. uint8array (UCS-2 big endian format) implementation
2. repalce tab characters by space, and trailing space characters are trimmed
Why did you change the entire file? It makes the diff just unreadable... Can you pust this as two different pull requests?