This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cyrillic scripts

Hi,

how is it possible to add Cyrillic scripts in one of my c-files (working with mdk version 3.4)?

const char text_cyrillic = {"Cyrillic script"};

best regards
Arne

Parents
  • >Opening an UTF8 file in uvision could look like:
    correct - your example is very similar.

    As long as the compiler is 8-bit safe, this really doesn't matter. You will get a perfect UTF8 text stord in the character constant. The only thing that will not work is that strlen() will return number of non-zero bytes, instead of number of characters. Not important for sending out text to a web browser.

    I know what you mean, uvision don't erase any kind of information but is not able to interpret the text correct (unicode format).

    But the web browser also shows these characters (from your example - not the correct unicode). I've tested the page in IE7 and firefox. Other pages in the www using cyrillic scripts, will be shown in the correct way. And of course I'm using the content-header with charset utf-8 (http header).

    So the only thing I don't understand is that the web browser won't show the correct unicode.

Reply
  • >Opening an UTF8 file in uvision could look like:
    correct - your example is very similar.

    As long as the compiler is 8-bit safe, this really doesn't matter. You will get a perfect UTF8 text stord in the character constant. The only thing that will not work is that strlen() will return number of non-zero bytes, instead of number of characters. Not important for sending out text to a web browser.

    I know what you mean, uvision don't erase any kind of information but is not able to interpret the text correct (unicode format).

    But the web browser also shows these characters (from your example - not the correct unicode). I've tested the page in IE7 and firefox. Other pages in the www using cyrillic scripts, will be shown in the correct way. And of course I'm using the content-header with charset utf-8 (http header).

    So the only thing I don't understand is that the web browser won't show the correct unicode.

Children
  • Have you made really sure that the web pages that gets sent out specifies the UTF8 encoding? If they don't, then the web browser will not know that there are any UTF8 multi-byte characters to display. It may default to the ISO-8859-1 character set instead.

    It really is important to note that a byte is just a binary storage cell capable of storing a value between 0 and 255. To display one or more bytes as specific characters, you must make sure that the renderer is informed about what character set to use, and also supports it.

    The support for different character sets in uvision is irrelevant in relation to your possibilities of selecting character sets for use in the web browser.

    In short: You must make sure that
    1) The web page data contains UTF8 data.
    2) The web page mentions that it is using UTF8 data.