当前位置:网站首页>Unified ordering background interface product description Chinese garbled
Unified ordering background interface product description Chinese garbled
2022-07-06 08:27:00 【Cabbage s】
When wechat pays, the product description is garbled as shown in the figure below
resolvent
//1 assemble body No conversion coding is required for parameters
//2 MD5 Encryption requires UTF-8
public static String MD5Encode(String origin, String charsetname) {
charsetname="utf-8";
String resultString = null;
try {
resultString = new String(origin);
MessageDigest md = MessageDigest.getInstance("MD5");
resultString = byteArrayToHexString(md.digest(origin
.getBytes(charsetname)));
} catch (Exception exception) {
}
return resultString.toUpperCase();
}
//3 No conversion coding is required when requesting wechat
- When the project starts add to Encoding settings -Dfile.encoding=UTF-8
Such as The startup command is java -jar xx.jar Change it to
java -Dfile.encoding=UTF-8 -jar xx.jar
边栏推荐
- Let the bullets fly for a while
- 使用 Dumpling 备份 TiDB 集群数据到兼容 S3 的存储
- 704 二分查找
- 你想知道的ArrayList知识都在这
- [cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes
- 2022.02.13 - NC003. Design LRU cache structure
- ESP系列引脚說明圖匯總
- 指针进阶---指针数组,数组指针
- On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
- JVM 快速入门
猜你喜欢
在 uniapp 中使用阿里图标
Hcip day 16
【MySQL】鎖
2022.02.13 - 238. Maximum number of "balloons"
[cloud native] teach you how to build ferry open source work order system
Online yaml to CSV tool
Wincc7.5 download and installation tutorial (win10 system)
pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
根据csv文件某一列字符串中某个数字排序
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
随机推荐
[research materials] 2021 China online high growth white paper - Download attached
让学指针变得更简单(三)
synchronized 解决共享带来的问题
将 NFT 设置为 ENS 个人资料头像的分步指南
[MySQL] log
ESP系列引脚说明图汇总
LDAP application (4) Jenkins access
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
使用 BR 备份 TiDB 集群数据到兼容 S3 的存储
在 uniapp 中使用阿里图标
Remote storage access authorization
Nacos Development Manual
Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
1202 character lookup
Golang DNS write casually
Fibonacci sequence
[MySQL] database stored procedure and storage function clearance tutorial (full version)
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
JVM performance tuning and practical basic theory - Part 1