kp.R: Let nchar() count for "bytes" instead of "chars" to work around Chinese character problems on Windows.