@walkero
You don't need unlibdev or other external dependencies to convert between local charset and unicode.
Just use IDiskfont->GetDiskFontCtrl(DFCTRL_CHARSET) to get the IANA number and you can then use IDiskfont->ObtainCharsetInfo() to request a mapping table.
ULONG charset;
const ULONG *maptable;
charset = IDiskfont->GetDiskFontCtrl(DFCTRL_CHARSET);
maptable = (const ULONG *)IDiskfont->ObtainCharsetInfo(DFCS_NUMBER, charset, DFCS_MAPTABLE);
The mapping table is an array of 256 ULONGs that are the unicode (UCS4) equivalents to each character in the local (8-bit) charset.
You can then use this to convert to unicode just like so:
n = IKeymap->MapRawKey(ie, &vanilla, 1, NULL);
if (n == 1)
{
ucs4 = maptable[(UBYTE)vanilla];
}
I use this method in
SSHTerm as libtsm (the terminal emulation layer I am using) works exclusively with unicode as well (see src/term-gc.c).