Added option for html decimal and hexadecimal encoding