pu369com

2021年8月20日

Unicode 和 UTF-8 有何区别

摘要: 比如 “我”这个字符。以二进制方式从文本文件中读,显示 :e6 88 91 也就是说, “我”的utf-8编码的Hex:'\xe6\x88\x91' 而用在线工具查,“我”的Unicode-Escape:'\u6211' 16进制的 6211 也就是 10进制的 25105 Unicode 和 UT 阅读全文

posted @ 2021-08-20 18:07 pu369com 阅读(2350) 评论(0) 推荐(0) 编辑

rust 读取文件

摘要: 1、逐行读文本 use std::fs::File; use std::io::{self, BufRead}; use std::path::Path; fn main() { // File hosts must exist in current path before this produce 阅读全文

posted @ 2021-08-20 17:31 pu369com 阅读(792) 评论(0) 推荐(0) 编辑

导航