People outside the US usually complain that their keyboard layouts do not encompass all the printable ASCII characters. But that is not a problem with ASCII.
ASCII does not encompass the entirety of the latin characters (áéóôüñ and so on), let alone the mostly different ones. Whoever lived in other countries had to fight a constant battle with MODE CODEPAGE PREPARE and CHCP in the DOS days. The printers then? Lots of fun with neverending streams of continuous feed printer paper or changes in formatting due to non-standard characters sent to the printer.
With UTF-8 this is a thing of the, now remote, past. The first 128 characters of UTF-8 are identical to ASCII. Together with the next 128 code points, you have Latin-1, the widest used "extended ASCII" set. And all the other 4 billion code points are there to code simply all the glyphs produced by humankind since the invention of writing by the ancient Sumerians.
Yup. 16-bit Unicode should have never existed to begin with. It was a disgrace, used unnecessary space and was a huge problem-maker for porting existing apps.
UTF-8 is great. You almost have nothing to do to support it, except when you need to delimit/count characters. And even that is pretty easy with just a couple rules to know and apply.
Perhaps 16 bit Unicode was a trick played on Microsoft management who looked at how many characters were in a Microsoft Chinese font, instead of looking at how many Chinese characters there really are.

16-bit Unicode had the merits of having fixed-size characters, so that probably appeared to be much simpler to deal with (after all, it was just a matter of changing the size of a "char").
16-bit Unicode had the merits of having fixed-size characters, so that probably appeared to be much simpler to deal with (after all, it was just a matter of changing the size of a "char").
Except for composite symbols of course
Well, isn't this more like UTF-16 than the original 16-bit Unicode that MS implemented? Not sure about that, just a question...
Well, isn't this more like UTF-16 than the original 16-bit Unicode that MS implemented? Not sure about that, just a question...
Unicode has code points for accented characters (for example 0x00e9 is e with "accent de gue"), but the same character my be composed, for example e (0x0065) followed by "combining" accent de gue (0x0301).
Most funny application is Mac OS, where the file names must be converted to canonical form (I think it's composed, but I don't remember exactly) before use. As a result, different UTF-8 strings may refer to the same file - cannot use strcmp().
-- Just a note: "acute" is "accent aigu" in French (if that's what you were trying to spell.)-
I'm sorry about that. I felt something was wrong. I should've gone with "accent grave".
People outside the US usually complain that their keyboard layouts do not encompass all the printable ASCII characters. But that is not a problem with ASCII.ASCII does not encompass the entirety of the latin characters (áéóôüñ and so on), let alone the mostly different ones. Whoever lived in other countries had to fight a constant battle with MODE CODEPAGE PREPARE and CHCP in the DOS days. The printers then? Lots of fun with neverending streams of continuous feed printer paper or changes in formatting due to non-standard characters sent to the printer.
With UTF-8 this is a thing of the, now remote, past.
With UTF-8 this is a thing of the, now remote, past.My point exactly. It was a problem with ASCII used by computer systems of YORE.
ASCII was clearly designed with the English language in mind (so no accents)
It was a limitation, but already a nice step forward.
I've sort-of been waiting for the first language/ide to allow user-specified mark-up of the source code. (no, not just some scheme done dynamically by the IDE. Actually IN the source code.) It would be ... interesting.
void foo()
{
char_UTF8_t msg1[]="欢迎来到中国";
uint8_t msg2[]="欢迎来到中国"; /* there was warning here, it'was somehow handled as ASCII 8bit */
uint32_t len1=sizeof(msg1)-1;
uint32_t len2=sizeof(msg2)-1;
}

Code: [Select]void foo()
{
char_UTF8_t msg1[]="欢迎来到中国";
uint8_t msg2[]="欢迎来到中国"; /* there was warning here, it'was somehow handled as ASCII 8bit */
uint32_t size1=sizeof(msg1);
uint32_t size2=sizeof(msg2);
}
size1 = 24 byte
size2 = 6byte
Houston, we have a problem

If you want to be standard-compliant, since C11 you type the literal as u8"欢迎来到中国" and every compiler is supposed to handle it correctly regardless of locale or anything.
u8"\u03BC" which is the small "mu" greek letter.I don't see any problem
legacy has a problem with some bullshit dinosaur-era compiler, as usual
18 bytes long
I don't see any problem
The problem is that warning-message since the UTF-8_t message somehow passed with a "cast" even if uint8_t is not the right type.
I would have been happy in seeing the C compiler issuing some error-message so the user could fix the mistake.
char_UTF8_t is non-standard
I think is required in most "safe C" rules such as MISRA-C

# evaline char_UTF32_t msg1="欢迎来到中国";
[char_UTF32_t] kind3 4:1 token_StrictAlphaNum, type21
[msg1] kind3 4:2 token_StrictAlphaNum, type21
[=] kind2 4:3 token_Assign, type39
[欢迎来到中国] kind3 4:4 token_String_UTF32, type424
[;] kind2 4:5 token_Semicolon, type92