Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decoding fileEncoding #127

Merged
merged 1 commit into from
Oct 20, 2017
Merged

Fix decoding fileEncoding #127

merged 1 commit into from
Oct 20, 2017

Conversation

gubikmic
Copy link
Contributor

Since the old-style plist format that's used for .pbxproj files seems to encode only Strings (and Arrays and Dictionaries) and does not preserve number types, we have to decode fileEncoding to
a String first.

For most projects where files are UTF-8 encoded the corresponding fileEncoding = 4 is omitted.
Thus this bug wouldn't manifest with many regular and recent projects.

In certain cases (like using the search & replace preview from Xcode 8 and prior) Xcode did add fileEncoding = 4 explicitly. I had some .pbxproj files around where this was the case and there the decoding failed.

Since the old-style plist format that's used for .pbxproj files
seems to encode only Strings (and Arrays and Dictionaries) and
does not preserve number types, we have to decode fileEncoding to
a String first.
@welcome
Copy link

welcome bot commented Oct 20, 2017

Thanks for opening this pull request! Please check out our contributing guidelines.

@pepicrft pepicrft added this to the 1.0.1 milestone Oct 20, 2017
Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge it. Nice job 😛

@gubikmic gubikmic merged commit 0cd310b into tuist:master Oct 20, 2017
@gubikmic gubikmic deleted the bugfix/fileEncoding branch October 20, 2017 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants