Sitelib: Python 3 compatibility: use get_charset() instead of getparam()