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
There can be multiple reasons for this:
<<<<<<< HEAD
, =======
and >>>>>>>
.
Please note that plutil -lint Localizable.strings
returned OK
for point-4!
Thanks to the plutil suggestion I understood that to make it work you have to delete also any \ or * as are not read as comments and, important, add a ; to the end of the file. Xcode 11.5.
If showing something like Unexpected character " at line 1, and it is the first string like "app_name"="Any Name"
Check that the file is UTF16
I was having the similar issue where i didn't escape the string value with backslash \
for one of my string's value.
Before:
"INVALID_NUMBER" = "It seems you're entering invalid number. Number should starts with "0" or "7"";
Updated:
"INVALID_NUMBER" = "It seems you're entering invalid number. Number should starts with \"0\" or \"7\"";
Backslashes are required when you want to display the quotation marks "
Please, have a quick look at here for How to include Quotation mark in strings
I just had this experience:
Files not working and getting an error like this one: ( testing with plutil -lint )
Localizable.strings: Unexpected character " at line 1
CardRatingView.strings: Unexpected character / at line 2
I just created a new file within XCode and copy pasted all the file content and suddenly everything was working properly.
I guess something can go wrong / corrupting the file itself while working with other text editors.
It seems your info.plist is not in correct form . check it properly. I also had the same issue . I resolved it by modifying my info.plist.