Fix a bug with non-ascii chars in ResourceFactory's url.