Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
COMMON: Rewrite Encoder and drop dependency on iconv #2586
Different platforms have different levels of support of encodings and
text data bss dec hex filename
The total is 96K. The tables can be moved to external file if this is a
It removes a duplicate table for korean in graphics/korfont.cpp
I agree in principle but the code is peppered with implicit conversions before this PR, so I think such refactoring merits a separate PR
criezy left a comment •
I think you are missing changes in
There is also a suggestion to move the encoding tests out of the testbed engine and into
And finally I am a bit worried with the added static conversion tables. We might hit issues on some platforms if we reach the executable size limit. I think it might be better to deport those tables to an encoding.dat file loaded at runtime (possibly in a lazy manner, i.e. when first needed).
But overall I think this is a good change to simplify the code and ensure consistency. So this is a thumb up from me.
criezy left a comment
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