avatar
Articles
292
Tags
211
Categories
0

karr's blog
Search

pyyaml 中文亂碼

Created2023-10-09|Updated2024-05-03
|Post Views:

https://www.cnblogs.com/BlueSkyyj/p/12781752.html

解决办法

加入参数
allow_unicode=True

1
2
3
4
fw = open(yamlFile,'a',encoding='utf-8')
w = r
yaml.dump(w,fw,allow_unicode=True)
fw.close()
Author: karr
Link: https://bitterteaer.github.io/pyyaml%20%E4%B8%AD%E6%96%87%E4%BA%82%E7%A2%BC/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Previous
redis实现分布式锁
Next
typing
avatar
karr
世界那么大,我想去看看。
Articles
292
Tags
211
Categories
0
gitee
Announcement
This is my Blog
Contents
  1. 1. 解决办法
Recent Post
python 使用线程池来同时执行多个函数2025-07-23
获取 A 股全部历史数据保存到本地2025-07-22
What are AI Agents?2025-07-21
Hello, 极简AES!2025-07-20
Git报错: Failed to connect to github.com port 443 解决方案2025-03-30
©2024 - 2025 By karr
Framework Hexo|Theme Butterfly
Search
Loading the Database