Guess best encoding from set for UTF-8 data in C #
I have a text that is UTF-8 encoded, well formatted. I cannot predict which languages ββthe text will be in.
To print this text on a thermal receipt printer, I need to choose the best encoding for displaying the text and converting to it. Unfortunately UTF-8 is not supported. All available encodings can only represent a subset of characters.
So I need to find the best option (for example, from the list given here https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=321 ) to transform the data and play like (I know I I will not be able to print Cyrillic together with Thai)
It is not a question of "guessing the encoding", but rather choosing the best encoding to minimize the loss of representable characters.
Has anyone seen a good approach?
source to share
No one has answered this question yet
Check out similar questions: