代码之家  ›  专栏  ›  技术社区  ›  Makaille

在可本地化文件中将文本编码更改为无显式

  •  2
  • Makaille  · 技术社区  · 7 年前

    目前我的 text encoding 的Localizable.strings 文件设置为 UTF-8 no explicit .

    No explicit

    无法使用指定的编码对输入文件进行解码:Unicode(UTF-8),文件内容似乎是用Unicode(UTF-16)编码的

    enter image description here

    2 回复  |  直到 7 年前
        1
  •  1
  •   Ian L    7 年前

    您可以尝试手动编辑 project.pbxproj 文件以删除 fileEncoding = x Localizable.strings 文件?

        2
  •  1
  •   Ankit Jayaswal    7 年前

    重置 Text-Encoding

    enter image description here

    然后选择 Text Encoding

    enter image description here

    更新:

    如果你不小心选择了 文本编码 project.pbxproj . 为此,请执行以下步骤:

    1. Project.xcodeproj

    enter image description here

    1. 正常开放 project.pbxproj fileEncoding = <encoding>; (例如: fileEncoding = 4; ),并保存文件。

    enter image description here