Posted by: estecb
« on: 23-08-2011, 07:21:49 »
I just upload some files named with foreign characters, just for testing...
This is the link generated by FIU:
https://rapidshare.com/files/1557378091/alú_tes_ñáéÃóú.txt
the file name is: https://rapidshare.com/files/3817198141/alú_tes_ñáéíóú.txt
If I upload the file through firefox, the link given by RS is okay: https://rapidshare.com/files/3817198141/alú_tes_ñáéíóú.txt
I didn't try uploading to other hosts, but I suspect I would get similar results.
Thanks
EDIT: ok, I just found out you are decoding the string as latin-1, and RS is sending the string as utf-8... I guess there's no easy way to solve this... you could try to auto detect the encoding (there are some libraries to do that), or just try to decode it as utf-8, if fails try to decode as latin-1 (the other way around won't work, since it's what you are doing now, latin-1 wont fail but it'll show some weird characters instead), then code as utf-8.