当前位置:网站首页>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一下 如果是正常中文,就可以直接用了
边栏推荐
- Technology Sharing | How to do assertion verification for xml format in interface automation testing?
- typescript42-readonly修饰符
- PotPlayer实现上班摸鱼电视自由
- unity2D横板游戏教程6-敌人AI以及受击动画
- C#异步和多线程
- Build your own web page on raspberry pie (1)
- 用户密码验证
- js实现一个 bind 函数
- 设计模式——组合模式、享元模式(Integer缓存)(结构型模式)
- DFS's complement to pruning
猜你喜欢

Kotlin-Flow common encapsulation class: the use of StateFlow

Interface test practice | Detailed explanation of the difference between GET / POST requests

Talking about GIS Data (5) - Geographic Coordinate System

数字孪生园区场景中的坐标知识

荧光标记多肽FITC/AMC/FAM/Rhodamine/TAMRA/Cy3/Cy5/Cy7-Peptide

【HMS core】【Ads Kit】华为广告——海外应用在国内测试正式广告无法展示

3. 无重复字符的最长子串

力扣561. 数组拆分

How to use the interface management tool YApi?Beautiful, easy to manage, super easy to use
![[Harmony OS] [ARK UI] ETS context basic operations](/img/40/d5924477c42e2b3246eb212f4be534.png)
[Harmony OS] [ARK UI] ETS context basic operations
随机推荐
Common lipophilic cell membrane dyes DiO, Dil, DiR, Did spectrograms and experimental procedures
Shell之条件语句
用户密码加密工具
3. 无重复字符的最长子串
Tributyl-mercaptophosphane "tBuBrettPhos Pd(allyl)" OTf), 1798782-17-8
c语言结构体中的冒泡排序
GIS数据漫谈(六)— 投影坐标系统
Technology Sharing | How to do assertion verification for xml format in interface automation testing?
13.
lt.647. Palindromic substring + lt.516. Longest palindrome subsequence 多肽介导PEG磷脂——靶向功能材料之DSPE-PEG-RGD/TAT/NGR/APRPG
CobalStrike(CS)基础超级详细版
js的垃圾回收机制
【Harmony OS】【ARK UI】Date 基本操作
接口测试如何准备测试数据
常见亲脂性细胞膜染料DiO, Dil, DiR, Did光谱图和实验操作流程
JS底层手写
Interface testing framework of actual combat (2) | interface request assertion
typescript44-对象之间的类兼容器
typescript45-接口之间的兼容性
shell脚本循环语句