首页 > 其他 > 详细

兰亭集序

时间:2019-03-04 10:12:13      阅读:154      评论:0      收藏:0      [点我收藏+]

今天在牛客上做到了这样一道题目:

The Orchid Pavilion(兰亭集序) is well known as the top of “行书”in history of Chinese literature. The most fascinating sentence is "Well I know it is a lie to say that life and death is the same thing, and that longevity and early death make no difference Alas!"(固知一死生为虚诞,齐彭殇为妄作).By counting the characters of the whole content (in Chinese version),the result should be 391(including punctuation). For these characters written to a text file,please select the possible file size without any data corrupt.

已知兰亭集序总长度是391个字(包括标点符号),试问他的UTF-8和UTF-16的编码长度?

一般来说,在GBK和GB2312中,汉字占2字节;TF-8中占3字节;UTF-16中占2字节

所以:

  • UTF-8: 391*3 + 3(标识)B
  • UTF-16:391*2+2(标识)B

 

兰亭集序

原文:https://www.cnblogs.com/yocichen/p/10468959.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!