Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]特定环境下put数字导致乱码 #2051

Open
icdada opened this issue Nov 24, 2023 · 4 comments
Open

[BUG]特定环境下put数字导致乱码 #2051

icdada opened this issue Nov 24, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@icdada
Copy link

icdada commented Nov 24, 2023

问题描述

简要描述您碰到的问题。

环境信息

请填写以下信息:

  • OS信息: [e.g.:Linux http-in-cloud 5.15.0-89-generic add testcase for v1issue3831 #99-Ubuntu SMP Mon Oct 30 20:42:29 UTC 2023 s390x s390x s390x GNU/Linux]
  • JDK信息: [e.g.:Openjdk 17]
  • 版本信息:[e.g.:Fastjson2 2.0.42]

重现步骤

如何操作可以重现该问题:

去ibm的https://linuxone.cloud.marist.edu/#/login 申请服务器
写一个使用fastjson2的jar(换了好几个版本,基本都是乱码)
带依赖打包jar
使用java -jar 打包的jar名称

如图所示部分数字出现了乱码,且在win下运行时完全正常
在换用org.json时输出完全正常
"""



src/main/resources
true



Httpserver


maven-compiler-plugin
3.11.0

17
17



org.apache.maven.plugins
maven-assembly-plugin
3.6.0


src/main/assembly/assembly.xml



org.example.Main





make-assembly
package


single





org.apache.maven.plugins
maven-resources-plugin
3.3.1


copy-resources
validate

copy-resources


${basedir}/target/classes


src/main/resources
true








"""

//可在此输入示例代码
JSONObject json = JSONObject.parseObject("{}");
        json.put("text2",1);
        json.put("text",0);
        System.out.printf(json +"\n");

期待的正确结果

对您期望发生的结果进行清晰简洁的描述。
正确的输出数字

相关日志输出

请复制并粘贴任何相关的日志输出。

附加信息

如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。

@icdada icdada added the bug Something isn't working label Nov 24, 2023
@icdada
Copy link
Author

icdada commented Nov 24, 2023

Uploading 屏幕截图 2023-11-24 231926.png…

@oooopl
Copy link

oooopl commented Nov 25, 2023

你这图片嘎了

@icdada
Copy link
Author

icdada commented Nov 25, 2023 via email

@wenshao
Copy link
Member

wenshao commented Nov 26, 2023

JDK是什么版本?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants