“朱元璋”.getBytes(“utf-8”).length = ?

"朱元璋".getBytes("utf-8").length = 9

"朱元璋".getBytes("GBK").length = 6

"朱元璋".getBytes("ISO8859-1").length = 3

"朱元璋".getBytes().length = 6       //在windows中文版上运行

"朱元璋".getBytes().length = 3       //在SCO UNIX上运行

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.