Change text encoding to No Explicit in localizable file

Viewed 2377

Currently my text encoding of the Localizable.strings file is set to UTF-8. All my other localizable files are set to no explicit.

I want to change UTF-8 to No explicit, how is it possible ?

If you want to know, it's cause with xCode 10 this error appears

could not decode input file using specified encoding: Unicode (UTF-8), and the file contents appear to be encoded in Unicode (UTF-16)

enter image description here

2 Answers

To reset the Text-Encoding type. Select your language.string file:

enter image description here

Then select Text Encoding from right hand panel:

enter image description here

Update:

If you accidentally selected the Text-Encoding, then you have to reset it from project.pbxproj. To do this follow below steps:

  1. Open package content of your Project.xcodeproj

enter image description here

  1. Open project.pbxproj and search for your file-name and remove the fileEncoding = <encoding>; (for example: fileEncoding = 4;), and save the file.

enter image description here

You could try manually editing the project.pbxproj file to remove the fileEncoding = x for your Localizable.strings file?

Related