当前位置:网站首页>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一下 如果是正常中文,就可以直接用了
边栏推荐
- BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier
- Interface test framework combat (1) | Requests and interface request construction
- Interface testing framework combat (3) | JSON request and response assertion
- Harmony OS ets ArkUI 】 【 】 the development basic page layout and data connection
- 【生物素叠氮化物|cas:908007-17-0】价格_厂家
- WebSocket的实际应用
- 接口测试框架实战(二)| 接口请求断言
- Interface Test Framework Practice (4) | Get Schema Assertion
- Shell条件语句判断
- 【Biotin Azide|cas:908007-17-0】Price_Manufacturer
猜你喜欢
2022/08/02 学习笔记 (day22) 多线程
Build your own web page on the Raspberry Pi (2)
接口管理工具YApi怎么用?颜值高、易管理、超好用
UV decomposition of biotin - PEG2 - azide | CAS: 1192802-98-4 biotin connectors
Concepts and Methods of Exploratory Testing
typescript45-接口之间的兼容性
2022/08/02 Study Notes (day22) Multithreading
IO进程线程->线程->day5
shell脚本循环语句
GIS数据漫谈(六)— 投影坐标系统
随机推荐
JS底层手写
Tag stack - stack monotonically preparatory knowledge - lt. 739. The daily temperature
Harmony OS Date ano UI 】 【 】 the basic operation
Apache DolphinScheduler版本2.0.5分布式集群的安装
VR全景展打造专属元宇宙观展空间
CobalStrike(CS)基础超级详细版
Flink状态
多肽介导PEG磷脂——靶向功能材料之DSPE-PEG-RGD/TAT/NGR/APRPG
shell script loop statement
Technology Sharing | How to do assertion verification for xml format in interface automation testing?
Jmeter 模拟多用户登录的两种方法
3. 无重复字符的最长子串
Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
Interface test framework combat (1) | Requests and interface request construction
IO process thread -> thread -> day5
MOSN 反向通道详解
数字孪生园区场景中的坐标知识
[Harmony OS] [ArkUI] ets development graphics and animation drawing
Presto installation and deployment tutorial
Get the Ip tool class