[PATCH] Add input character set infrastructure

Zack Weinberg zack@codesourcery.com
Thu Jan 15 03:33:00 GMT 2004


neroden@twcny.rr.com (Nathanael Nerode) writes:

> Wouldn't it be clearer to use an explicit cast rather than using the implicit
> conversion from uchar to cppchar_t?... that would be more self-documenting,
> and would be easier to identify as an error if cppchar_t ever changed.

Yeah, you're right I think.

>
> +  /* Default the input character set to iso-8859-1 for now. */
> +  CPP_OPTION (pfile, input_charset) = "ISO-8859-1";
> +
>
> Is this really the right *default*?  I actually think UTF-8 is a more common
> default nowadays.  :-/

This is temporary.  It's going to default to the locale eventually.

> +  /* Holds the name of the input character set.  */
> +  const char *input_charset;
> +
>
> This looks like the input_charset will only be alterable at compile time,
> not at runtime.  Is that right?

Only because the command line option hasn't been added yet.

zw



More information about the Gcc-patches mailing list