fix encoding issue with px:set-doctype

Setting `charset=$encoding` is fine for utf-8; I don't know if we need to create a map of default mappings between encodings and charsets. This should be fine for now.