Fixed UTF handling and URL escaping