Better character encoding detection in GetTitleFromUrl