avoid default encoding.
NOSONAR
simplify dead code.