Localizable.strings - The data couldn’t be read because it isn’t in the correct format

前端 未结 18 1195
广开言路
广开言路 2021-01-30 06:20

If I copy something from textedit or web and paste it to localizable file it shows this compilation error. If I type those in localizable file it does not show any error. I am a

18条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 07:11

    • Use plutil from the Terminal:

    you have to run it for each version of the localizable file. E.g

    1. cd into your project root
    2. cd eb.lproj - you can replace this with any localisation you are working with.
    3. plutil -lint Localizable.strings

    When you run step 3, you will either be shown an error, telling you what is wrong with your file. Or you will be told the file is OK

    Note that plutil output is bad, it seems it always says "Unexpected character at line 1" but above that output, it prints other stuff like missing semicolon on line 121, and that is the real error

提交回复
热议问题