Hello,
I want to use a char string with numbers for Non-Ascii chars, e.g. char Str4[] = {char(35),char(38),char(37),char(34)}; or only
char Str4[] = {35,38,37,34};
The chars will be shown always correct but strlen(Str4) isn't correct, there will be added an additional 2 to the right string length. e.g. 23 instead of 3 for the example.
sizeof isn't useful because here is the size always 2. not depending on the number of the char numbers of the char string.
I need to use char string because I want use it for existing fonts, too and chars above 128 aren't standardized.
The strlen() function simply walks along the array, looking for the position in the array that contains a NULL. Whether the positions in the array contain printable characters, or not, is irrelevant.
You need to properly NULL terminate the arrays if you expect to be able to use strlen() to compute the length. Be sure to allow room in the array for the terminating NULL.