Re: Initializing unichar variable with a human readable letter

2010-07-20 Thread Matt Neuburg
On Tue, 20 Jul 2010 08:17:51 -0700, James Bucanek said: >While you can often get away with sticking non-ASCII characters >into string literals, it is a non-standard solution that is >unsupported and fragile There's no guarantee that it will work >with future (or past) versions of the compiler or i

Re: Initializing unichar variable with a human readable letter

2010-07-20 Thread Sean McBride
On Tue, 20 Jul 2010 08:17:51 -0700, James Bucanek said: >Others can correct me if I'm wrong, but the basic problem here >is that GCC does not, and cannot, know the character encoding of >the source file. Thus, program source code must be restricted to >ASCII and any non-ASCII characters are unpred

Re: Initializing unichar variable with a human readable letter

2010-07-20 Thread James Bucanek
vincent habchi wrote (Saturday, July 17, 2010 1:58 PM +0200): I have a very simple problem: I'd like to affect to a unichar variable the value of the glyph é (or any non-ascii character). Others can correct me if I'm wrong, but the basic problem here is that GCC d

Re: Initializing unichar variable with a human readable letter

2010-07-18 Thread Alastair Houghton
On 18 Jul 2010, at 09:38, vincent habchi wrote: > Since I use the unichar to make comparisons, I could also have initialized a > custom NSCharacterSet with "é", but, as we say here in France: "it's like > using a bulldozer to break a nut shell". It's worth perhaps pointing out that comparing wi

Re: Initializing unichar variable with a human readable letter

2010-07-18 Thread vincent habchi
Hi Ken, > Doing this will probably work: > unichar foo = L'é'; Thanks, that's perfect. > With modern compilers, it should be possible to do (roughly) what you want if > the source file is UTF-8 encoded. However, note that "é" is often > represented as "e" followed by U+0301 COMBINING ACUTE AC

Re: Initializing unichar variable with a human readable letter

2010-07-17 Thread Ken Thomases
On Jul 17, 2010, at 3:58 PM, vincent habchi wrote: > I have a very simple problem: I'd like to affect to a unichar variable the > value of the glyph é (or any non-ascii character). > > If I (naively) write: "unichar foo = 'é';", I get a warning from the compiler > about multibyte const and it d