FileDownloader icon indicating copy to clipboard operation
FileDownloader copied to clipboard

下载xml中文乱码问题

Open cwuom opened this issue 3 years ago • 0 comments

image 源码

FileDownloader.getImpl().create("http://comment.bilibili.com/"+cid+".xml")
                        .setPath(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath() + "/" + cid + ".xml")
                        .setListener(new FileDownloadListener() {
                            @Override
                            protected void pending(BaseDownloadTask task, int soFarBytes, int totalBytes) {

                            }

                            @Override
                            protected void connected(BaseDownloadTask task, String etag, boolean isContinue, int soFarBytes, int totalBytes) {
                            }

                            @Override
                            protected void progress(BaseDownloadTask task, int soFarBytes, int totalBytes) {
                            }

                            @Override
                            protected void blockComplete(BaseDownloadTask task) {
                            }

                            @Override
                            protected void retry(final BaseDownloadTask task, final Throwable ex, final int retryingTimes, final int soFarBytes) {
                            }

                            @Override
                            protected void completed(BaseDownloadTask task) {
                                mElasticDownloadView.success();
                            }

                            @Override
                            protected void paused(BaseDownloadTask task, int soFarBytes, int totalBytes) {
                            }

                            @Override
                            protected void error(BaseDownloadTask task, Throwable e) {
                                mElasticDownloadView.fail();
                            }

                            @Override
                            protected void warn(BaseDownloadTask task) {
                            }
                        }).start();

不知道为什么,我换好多种办法都无法解决中文乱码的问题 能告诉我怎么解决吗

cwuom avatar Jul 09 '22 04:07 cwuom