• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes


  • Subject: Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
  • From: "Steve Evans" <email@hidden>
  • Date: Sat, 16 Feb 2008 20:25:55 +0200

Hi Chris,
 
Yes. That seems to have solved the problem. Many Thanks!
 
 
----- Original Message -----
From: Chris Espinosa
To: Steve Evans
Cc: email@hidden
Sent: Saturday, February 16, 2008 8:07 PM
Subject: Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes


On Feb 16, 2008, at 10:04 AM, Steve Evans wrote:

I'm having a weird problem in Xcode 3.0. I'm programming in C++ and I have some existing code I ported over from Windows (via Perforce). When I compile the file I get the following warning coming out of gcc:
 
"warning: multi-character character constant"
 
The problem is always related to lines using escape sequences:
 
e.g. char p = '\n';
 
In the Xcode editor window, the line appears with one backslash and so it appears that the compiler error makes no sense. However, if I view the same file with vi I see two backslashes i.e. char p = '\\n';. Then all becomes clear.
 
After correcting the problem in vi, everything compiles without problem. However, if I then go and make changes using the Xcode editor, all backslashes are replaced by double backslashes again! But as before, I only see the two backslashes if I view the file with something like vi.

Change your Text Encoding format from "Non-Lossy ASCII".  That's an obscure legacy encoding that, well, escapes backslashes.  You want UTF-8 or ASCII.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >XCode 3.0 Editor Replaces Backslashes with Double Backslashes (From: "Steve Evans" <email@hidden>)
 >Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
  • Next by Date: Re: Env variables dropped in 3.0
  • Previous by thread: Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
  • Next by thread: OT? gethostbyname failure
  • Index(es):
    • Date
    • Thread