当前位置:网站首页>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一下 如果是正常中文,就可以直接用了
边栏推荐
- 安装IIS服务(Internet信息服务(Internet Information Services,简写IIS,互联网信息服务)
- 用户密码加密工具
- rosbag工具plotjuggler无法打开rosbag的问题
- Secondary development of WinForm controls
- MCM box model modeling method and source analysis of atmospheric O3
- C#异步和多线程
- 多肽介导PEG磷脂——靶向功能材料之DSPE-PEG-RGD/TAT/NGR/APRPG
- Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
- Shell conditional statement judgment
- How to prepare for the test interface test data
猜你喜欢

BIOTIN ALKYNE CAS:773888-45-2价格,供应商

Shell之条件语句

Online password generator tool recommendation

Shell conditional statement judgment

测试人员的价值体现在哪里

【Harmony OS】【ARK UI】ets使用startAbility或startAbilityForResult方式调起Ability

Exception (abnormal) and Error (error) difference analysis

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

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

Peptides mediated PEG DSPE of phospholipids, targeted functional materials - PEG - RGD/TAT/NGR/APRPG
随机推荐
Jmeter 模拟多用户登录的两种方法
Ali cloud object storage oss private barrels to generate links
测试人员的价值体现在哪里
shell脚本循环语句
Exception(异常) 和 Error(错误)区别解析
Detailed explanation of MOSN reverse channel
业务表解析-余额系统
Where is the value of testers
数字孪生园区场景中的坐标知识
【精讲】利用原生js实现todolist
接口测试如何准备测试数据
Build your own web page on the Raspberry Pi (2)
DFS's complement to pruning
2022暑假牛客多校联赛第一场
odps的临时查询能在写sql的时候就给结果一个命名不?
[Harmony OS] [ArkUI] ets development graphics and animation drawing
shell script loop statement
js garbage collection mechanism
typescript42-readonly修饰符
JS bottom handwriting