better handling of special characters in window title