这是什么编码,如何把它变成我能正确看到的东西?

问题描述 投票:-1回答:1

我正在编写一个脚本,该脚本将对流行的流媒体服务(Netfl * x)的字幕文件进行操作。

字幕文件中包含奇怪的字符,我无法以文本编辑器或Web浏览器以可读方式显示的方式进行渲染。 xml编码表示UTF-8,但有些字符不可读。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tt xmlns:tt="http://www.w3.org/ns/ttml" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:tts="http://www.w3.org/ns/ttml#styling" ttp:tickRate="10000000" ttp:timeBase="media" xmlns="http://www.w3.org/ns/ttml">
<p>de 15 % la nuit dernière.</span></p>
<p>if youâve got things to doâ¦</span></p>

而在Vim:

enter image description here

这就是它在浏览器中的样子:

enter image description here如何将其转换为我可以使用的东西?

character-encoding
1个回答
1
投票

我会说你的文件是UTF-8编码就好了,而你只是使用错误的编码来查看它。以UTF-8编码的字符是C3 80。 ISO-8859-1中的C3是Ã,在你的屏幕截图中跟着一个80。所以看起来你正在使用(错误的)ISO-8859编码查看UTF-8文件。

打开文件时使用正确的编码。

© www.soinside.com 2019 - 2024. All rights reserved.