Cocoapods replacing curly-quotation marks with Äù #730

Closed
MaxGabriel opened this Issue Jan 9, 2013 · 15 comments

Projects

None yet

3 participants

@MaxGabriel
Contributor

After running pod install I noticed that ” was replaced with Äù in my Project Settings (.pbxproj) file.

Screen Shot 2013-01-09 at 11 01 20 AM

This didn't seem to cause any problems (the app ran fine either way), but it seemed like a bug.

I was able to repro this on my laptop as well. Both machines were running Cocoapods 0.16.0

Output of 'ruby -v' on the desktop: ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
Output of 'ruby -v' on the laptop: ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.1]

Perhaps related, but I received the following three warnings when running pod install:
[!] The target Heyzap [Debug - Release - Distribution]' overrides theHEADER_SEARCH_PATHS' build setting defined in Pods/Pods.xcconfig'. - Use the$(inherited)' flag, or
- Remove the build settings from the target.

[!] The target Heyzap [Debug - Release - Distribution]' overrides theOTHER_LDFLAGS' build setting defined in Pods/Pods.xcconfig'. - Use the$(inherited)' flag, or
- Remove the build settings from the target.

[!] The target Heyzap [Debug - Release - Distribution]' overrides theALWAYS_SEARCH_USER_PATHS' build setting defined in Pods/Pods.xcconfig'. - Use the$(inherited)' flag, or
- Remove the build settings from the target.

(If anyone could better explain the warnings to me, that would be appreciated. I'm not sure how to use the $(inherited) flag)

@MaxGabriel MaxGabriel referenced this issue in CocoaPods/search.cocoapods.org Jan 9, 2013
Closed

Cocoapods replacing curly-quotation marks with Äù #26

@alloy
Member
alloy commented Jan 10, 2013

Can you figure out which pod is adding these settings? While we should not break characters, it is likely that these characters shouldn’t be in there anyways.

Regarding the use of $(inherited), this is a special value that you can add to build settings which will insert the value of the higher level build settings (e.g. the project level and base configuration level (xcconfig)). Basically, if you have something like -l xml in OTHER_LDFLAGS, then you change that to be -l xml $(inherited). I don’t know of a Apple page about it, but there is much to be found by googling.

@MaxGabriel
Contributor

@alloy - I was using only the MAObjCRuntime pod (I just grabbed an arbitrary pod to start with -- I could probably try a different one to try and reproduce today). I feel like you're probably right that those characters shouldn't be in there in the first place, but it feels like a symptom of a larger character encoding issue.

@alloy
Member
alloy commented Jan 10, 2013

Oh wait, now I see, I mistakingly thought this was in Pods.xcodeproj, but it’s your project and you have added those values (including quotation marks) yourself, right?

Can you check what your LC_CTYPE is set to?

> echo $LC_CTYPE
UTF-8
@fabiopelosin
Member

This appears to be an Xcodeproj issues. My bet is that it is a bug in the native extension. There are also other open issues related to character encoding, which I think share the same bug.

@MaxGabriel
Contributor

Oh, yes, it is my .xcodeproj file, with my curly quotes; I didn't think to clarify that. When I run echo $LC_CTYPE it just returns a blank line. Some googling says I need to "make sure that the en_US.UTF-8 locale is installed, and
set your LC_CTYPE environment variable to: en_US.UTF-8".

@alloy
Member
alloy commented Jan 10, 2013

@MaxGabriel Does setting the env variables and re-install fix the issue? Here are my locale settings:

> locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

@irrationalfab It’s, I think, more of a Ruby & Xcodeproj issue, let’s see if the above fixes it.

@MaxGabriel
Contributor

@alloy I set the LC_CTYPE to en_US.UTF-8 and had the same problem.
Screen Shot 2013-01-10 at 1 20 10 PM

Here is my locale output

funstation:iphone sdkbuild$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
@MaxGabriel
Contributor

Oh, I noticed I didn't do export LC_CTYPE after setting my LC_CTYPE. Not sure if I needed to do that, but I can try again after doing that in the next few hours.

@alloy
Member
alloy commented Jan 13, 2013

@MaxGabriel Have your tried exporting the value?

@MaxGabriel
Contributor

Sorry that took awhile -- doing this on a work machine. Unfortunately, doing export LC_CTYPE still resulted in the same problem
Screen Shot 2013-01-14 at 4 05 48 PM
Screen Shot 2013-01-14 at 4 05 27 PM

@alloy
Member
alloy commented Jan 15, 2013

@MaxGabriel Can you share the Xcode project? Or reduce the issue to a new Xcode project?

@MaxGabriel
Contributor

It's a work project I can't share, buy I'll try and create a sample project that replicates it

@MaxGabriel
Contributor

Hi, sorry to have not responded to this in 3 weeks. Here is an example project demonstrating the problem (this time I just made a file with the curly quotes in the name). Run pod install to reproduce the problem.

Note the offending character change in this screenshot:
Screen Shot 2013-02-04 at 11 19 48 PM

@fabiopelosin
Member

Actually it shouldn't be Xcodeproj: CocoaPods/Xcodeproj@b6f3d3f

@fabiopelosin
Member

Moving this #926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment