当前位置:网站首页>minio下载文件乱码或者是一条横线
minio下载文件乱码或者是一条横线
2022-08-03 05:09:00 【飞四海】
项目场景:
minio下载文件乱码或者是一条横线
问题描述
这是因为 环境不匹配造成 Liunx和win都是有区别的所以要根据编码去试试
response.setCharacterEncoding(DictConstant.UTF_8);
String fileName =URLDecoder.decode(files.getFileName(), Charsets.UTF_8);
logger.info("--------------------fileName1:{}",fileName);
String fileName2 =URLDecoder.decode(files.getFileName(), Charsets.ISO_8859_1);
logger.info("--------------------fileName2:{}",fileName2);
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") );
解决方案:
直接挨个编码去decode一下 如果是正常中文,就可以直接用了
边栏推荐
- Peptides mediated PEG DSPE of phospholipids, targeted functional materials - PEG - RGD/TAT/NGR/APRPG
- rosbag工具plotjuggler无法打开rosbag的问题
- 13.
lt.647. Palindromic substring + lt.516. Longest palindrome subsequence - Presto installation and deployment tutorial
- How to use the interface management tool YApi?Beautiful, easy to manage, super easy to use
- shell脚本循环语句
- Shell conditional statement judgment
- typescript49-交叉类型
- C#异步和多线程
- 在线密码生成工具推荐
猜你喜欢

typescript40-class类的保护修饰符

接口测试框架实战 | 流程封装与基于加密接口的测试用例设计

Super handy drawing tool is recommended

【Biotin Azide|cas:908007-17-0】Price_Manufacturer

Interface Test Framework Practice | Process Encapsulation and Test Case Design Based on Encrypted Interface

探索性测试的概念及方法

Installation of Apache DolphinScheduler version 2.0.5 distributed cluster

接口管理工具YApi怎么用?颜值高、易管理、超好用

13.
lt.647. Palindromic substring + lt.516. Longest palindrome subsequence 
tag单调栈-单调栈预备知识-lt.739. 每日温度
随机推荐
BIOTIN ALKYNE CAS:773888-45-2价格,供应商
接口测试框架实战(三)| JSON 请求与响应断言
[Developers must see] [push kit] Collection of typical problems of push service service 2
Interface test Mock combat (2) | Combined with jq to complete batch manual Mock
typescript45-接口之间的兼容性
Tag stack - stack monotonically preparatory knowledge - lt. 739. The daily temperature
idea使用@Autowired注解爆红原因及解决方法
【精讲】利用原生js实现todolist
1079 延迟的回文数 (20 分)
1089 狼人杀-简单版 (20 分)
Get the Ip tool class
Exception (abnormal) and Error (error) difference analysis
tag单调栈-单调栈预备知识-lt.739. 每日温度
MOSN 反向通道详解
反射注解基础
接口测试框架实战(二)| 接口请求断言
User password verification
Build your own web page on the Raspberry Pi (2)
【Harmony OS】【ARK UI】轻量级数据存储
Where is the value of testers