Merge pull request #1052 from tzz/tzz/1032-read-proc-and-sys-specially

Redmine#1032: fix 1-byte read issue
Redmine#3454: simple text manipulation functions