gpt4 book ai didi

python - 在 Python 中检测字符集并转换为 utf-8?

转载 作者:IT老高 更新时间:2023-10-28 21:56:45 24 4
gpt4 key购买 nike

是否有任何通用的方法来检测字符串字符集?我使用 IPTC 标签并且没有已知的编码。我需要检测它,然后将它们更改为 utf-8。

有人可以帮忙吗?

最佳答案

您想使用 chardet , 一个编码检测器

关于python - 在 Python 中检测字符集并转换为 utf-8?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6707657/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com