simple numerical base conversion with optionally custom charsets