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

前端 未结 18 1170
广开言路
广开言路 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:17

    I know this question was asked long ago but my scenario and solution is little bit different. Today I faced same issue but when I tried to check the issue using

    plutil -lint Localizable.strings

    I got OK status which means everything is fine, then I tried to find issue using

    pl < Localizable.strings

    But again I got file text printed with no error mentioned, then I tried a trick and it worked for me.

    • Right click on the Localizable.strings file
    • Then select option Open As option
    • Then select option ASCII Property List

    That's it, XCode shows me the issue with line number and the issue was I had this DéjàVerified text as key on specified line, this helps me to identify and solve the issue, I hope it will save someone's time.

    Cheers!

提交回复
热议问题