记录一个编码问题

技术 · 28 天前

今天写测试代码,一直出现乱码,发现源码是UTF8格式保存的

std::string ansi_str = "Hello, 世界!";

实际上字符串是以utf8格式保存的