Re: En-dash versus em-dash

On Mon, 2012-12-10 at 17:28 +0000, Philip Withnall wrote:

> Are there any reasons against putting UTF-8 characters in the source
> code (which weren’t covered in my blog post)?

You can put UTF-8 in the source code, and GCC understands it just fine.

See also "man gcc" and the options -finput-charset and -fexec-charset.
Both default to UTF-8.

That is, GCC will do this if it finds

  char *tomorrow_in_spanish = "mañana";

1. See that it is a multibyte string, assume UTF-8 per default

2. Output the same UTF-8 string by default to the compiled file

TL;DR: It's 2012.  The compiler understands UTF-8 and defaults to it.
Use it :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]