Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
- Subject: Re: XCode 3.0 Editor Replaces Backslashes with Double Backslashes
- From: Chris Espinosa <email@hidden>
- Date: Sat, 16 Feb 2008 10:07:42 -0800
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