RE: gcc build with multibyte support?
RE: gcc build with multibyte support?
- Subject: RE: gcc build with multibyte support?
- From: "Zartaj T. Majeed" <email@hidden>
- Date: Sat, 10 Apr 2004 11:15:22 -0700
The point is the default gcc 3.3 on Mac OS X 10.3.2 regards
the second byte in 0x905c as a backslash character because
it is not enabled for multibyte. When it is enabled it should
properly process the two bytes as a single character. Here's
the relevant quote from the man page:
"The LC_CTYPE environment variable specifies character classifica-
tion. GCC uses it to determine the character boundaries in a
string; this is needed for some multibyte encodings that contain
quote and escape characters that would otherwise be interpreted as
a string end or escape."
These tricky and subtle issues are the bane of dealing with DBCS.
Fortunately they are not encountered as much in internationalized
programming today with the proliferation of Unicode.
Anyway I now have a multibyte-enabled build of gcc and it seems
to be doing somewhat better on parsing shift-jis literals but still not
producing 100% correct output. But that may be due to bugs in gcc 3.3.
Zartaj
-----Original Message-----
From: email@hidden [mailto:email@hidden] On Behalf Of Glenn L. Austin
Sent: April 09, 2004 11:18 PM
To: email@hidden
Subject: Re: gcc build with multibyte support?
on 4/9/04 5:13 PM, Zartaj Majeed at email@hidden wrote:
> Yes, backslash is an escape sequence but this is not
> a backslash; it's the second byte of a two-byte
> character. The two bytes should be processed as
> a unit if proper multibyte support were enabled.
> However in trying to explain the problem I think
> I made a mistake in using the hex escape sequence
> for the first byte. Replace the hex sequence with
> the actual byte value of 0x90 which is what a Japanese
> editor would insert. GCC still can't parse the character.
But to the compiler, it is still a backslash escape character -- the
compiler knows about how to build strings from hex codes and characters.
--
Glenn L. Austin <><
Computer Wizard and Race Car Driver
<email@hidden>
<http://www.austin-home.com/glenn/>
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.