Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我正在从远程服务器下载文件。我正在使用其原始名称保存文件。问题是,在 url 名称中出现如下: 03%20Nas%20murrgo%20shov.mp3而实际文件名是Nas murrgo shov.mp3。那么,如何格式化文件名呢?
看起来您的字符串是 URL 编码的。尝试 :
java.net.URLDecoder.decode(filename, "UTF-8");