Re: Re: Illegal byte sequence
Re: Re: Illegal byte sequence
- Subject: Re: Re: Illegal byte sequence
- From: "Mark Wagner" <email@hidden>
- Date: Thu, 7 Dec 2006 15:58:54 -0800
On 12/7/06, Chris Espinosa <email@hidden> wrote:
On Dec 4, 2006, at 2:14 PM, Mark Wagner wrote:
> When compiling one of the source code files in my project using GCC 4,
> I get the error message "PGHTMDEF.C:350:1: error: converting to
> execution character set: Illegal byte sequence". Line 350 is the last
> line in the file, and contains only a Windows-style CR/LF sequence, so
> I doubt this is where the actual error is. What causes this error,
> why didn't it happen in GCC 3.3, and how can I figure out where the
> error is?
What are the line endings elsewhere in the file? All CRLF, all LF? Does
changing the line endings in Xcode fix the problem?
All CRLF.
One thing to check, and this may sound off the wall, is whether you have
Xcode set to compile this as a C file. Due to ancient Unix history, gcc
defaults to interpreting files ending in .C (not .c, which is different) as
C++. So try setting your dialect to C to force the .C file to be C instead
of C++.
Due to ancient history (the very first version of this program was
developed under MS-DOS), every last one of the source code files end
in .C. Changing things to force C compiliation didn't fix it, though.
A binary search (delete half the file, then compile) shows that the
problem is on line 57:
wchar_t data_chars[] = {
L"ÆÁÂÀÅÃÄÇ*ÉÊÈËÑÓÔÒØÕÖ*ÚÛÙÜ*á´âæàåãä|ç*¢(c)€°÷éêè—*ë***íî¡ì¿ï«ÍÎÌϯµ*\x00A0¬ñóôòªºøõö¶±£»(r)§–ß*X™úûù¨ü*¥ÿ\0"
};
(in case it doesn't come through correctly, that's a whole series of
characters with values greater than 127). The file's encoding is set
to Mac OS Roman.
--
Mark Wagner
_______________________________________________
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