add character_set parameter and rspec tests for single_string method