use generic_string() 

backports https://github.com/wesnoth/wesnoth/commit/115c2a7985ae998f44acd396f70635d40337e939