当前位置:网站首页>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一下 如果是正常中文,就可以直接用了
边栏推荐
- Lambda表达式案例
- Install PostgreSQL on Windows
- 【Harmony OS】【ArkUI】ets开发 图形与动画绘制
- Interface Test Framework Practice (4) | Get Schema Assertion
- C#异步和多线程
- 接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock
- typescript42-readonly修饰符
- Get the Ip tool class
- 荧光标记多肽FITC/AMC/FAM/Rhodamine/TAMRA/Cy3/Cy5/Cy7-Peptide
- 【Harmony OS】【ARK UI】轻量级数据存储
猜你喜欢

typescript47-函数之间的类型兼容性

OSI的分层特点、传输过程与三次握手、四次挥手、tcp与udp包头的描述

【Harmony OS】【ARK UI】ets use startAbility or startAbilityForResult to invoke Ability

接口测试如何准备测试数据

Online password generator tool recommendation

Jmeter 模拟多用户登录的两种方法

IO进程线程->线程->day5

【生物素叠氮化物|cas:908007-17-0】价格_厂家

Build your own web page on the Raspberry Pi (2)

js implements a bind function
随机推荐
Super handy drawing tool is recommended
3. 无重复字符的最长子串
接口和协议
Interface testing framework of actual combat (2) | interface request assertion
【软件工程之美 - 专栏笔记】35 | 版本发布:软件上线只是新的开始
[Fine talk] Using native js to implement todolist
Interface Test Framework Practice | Process Encapsulation and Test Case Design Based on Encrypted Interface
PotPlayer实现上班摸鱼电视自由
GIS数据漫谈(六)— 投影坐标系统
【Harmony OS】【FAQ】Hongmeng Questions Collection 1
BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier
用户密码验证
Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
MCM箱模型建模方法及大气O3来源解析
typescript39-class类的可见修饰符
[Developers must see] [push kit] Collection of typical problems of push service service 2
超好用的画图工具推荐
接口测试框架实战(一) | Requests 与接口请求构造
Ali cloud object storage oss private barrels to generate links
13.< tag-动态规划和回文字串>lt.647. 回文子串 + lt.516.最长回文子序列