You can buy this project and download/modify it how often you want.
DECIMAL_CHAR_REF=2 HEX_CHAR_REF=1 NAMED_CHAR_REF=3 CHARS=4