I have one question about strings and characters in C #. I found that a string in C # is a Unicode string, and char takes 2 bytes. Thus, each char is in UTF-16 encoding. This is great, but I also read on Wikipedia that there are some characters that take 4 bytes in UTF-16.
I am making a program that allows you to draw characters for alphanumeric displays. The program also has a tester in which you can write some line, and it draws it for you to see how it looks.
So, how should I work with strings where the user writes a character that takes 4 bytes, i.e. 2 characters. Since I need to pass char to char through a string, find that char in the list and draw it in the panel.
source share