I have a local pdf and I try load this pdf in an iframe by the path of the file.
The file has a name 明星.pdf and the path is like this: http://localhost:8080/path-here/明星.pdf
When I try open the pdf file, the browser do this request and fails (404): http://localhost:8080/path-here/%E6%98%8E%E6%98%9F.pdf
The problem only occurs with pdfs that contains chinese characteres.
Any suggestion?
PS: I'm using javascript.
Edit:
Example:
//there's a http:// in front, I can't put more links in post
var url = 'localhost:8080/path-here/teste.pdf'
var url2 = 'localhost:8080/path-here/明星.pdf'
window.open(url,"_blank") //works fine
window.open(url2,"_blank") //fails
See Question&Answers more detail:os