8 Commits

Author SHA1 Message Date
Le Philousophe
58f728a042 COMMON: Fix UTF-16 decoding
In case of 4-bytes codepoints, length wasn't decreased.
If codepoint is invalid don't eat the second code unit to let
resynchronization happen.
2020-12-01 19:43:20 +01:00
Vladimir Serbinenko
68a9136e4d
COMMON: Rewrite Encoder and drop dependency on iconv (#2586)
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.

It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
Cameron Cawley
6e0c93dc46 COMMON: Add helper functions for converting strings 2020-09-12 11:59:23 +02:00
lolbot-iichan
d8951b2aa1 COMMON: Add Persian language & CP1256 encoding 2020-05-18 23:24:15 +02:00
Eugene Sandulenko
5825a30b67 JANITORIAL: Whitespace fixes 2019-12-13 00:02:38 +01:00
Eugene Sandulenko
4b0fcd411b COMMON: Fix string length in U32String::encode()
Our method expects length in bytes, not in characters, which is 4x for U32
2019-12-12 23:59:58 +01:00
Le Philousophe
6aaec02c57 COMMON: Add CJK encodings to Common::CodePage
Use Encoding::convert to do the conversion first and try old method if
it fails
2019-11-30 13:34:33 +02:00
Eugene Sandulenko
50822e708b COMMON: Moved string encoding to separate file 2019-10-19 17:38:26 +02:00