avatar
Articles
290
Tags
207
Categories
0

karr's blog
Search

pyyaml 中文亂碼

Created2023-10-09|Updated2025-02-19
|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
290
Tags
207
Categories
0
gitee
Announcement
This is my Blog
Contents
  1. 1. 解决办法
Recent Post
What are AI Agents?2025-07-21
Hello, 极简AES!2025-07-20
Git报错: Failed to connect to github.com port 443 解决方案2025-03-30
AI Agent 系统架构图2025-03-28
固定整个页面只有100%的高度,不能进行下拉,当组件的内容超过100%时候在个自组件内部加上滚动条2025-03-12
©2024 - 2025 By karr
Framework Hexo|Theme Butterfly
Search
Loading the Database