added charset functionality

The extra files are from PhpStorm, feel free to delete them.