The previous patch failed with icedtea-6, which has uncatched 'decoding-error' in addition to 'encoding-error'. And it seems that only icedtea-8 needs patch, since in icedtea-7 the USE_SYSTEM_GTK, USE_SYSTEM_FONTCONFIG, etc make it links with those libraries instead of dlopen them. So, now only patch icedtea-8: