gpt4 book ai didi

java - Blackberry - Java - 阿拉伯语显示 JSON 输出已损坏

转载 作者:行者123 更新时间:2023-12-01 15:56:36 34 4
gpt4 key购买 nike

阿拉伯语显示 JSON 输出已损坏

我正在使用 BlackBerry 开发指南代码示例加载 JSON:Parsing a JSON data structure

工作正常。但有些字段是阿拉伯语的。这些显示为垃圾字符。

الرØϙŠØ³ التنÙيذي ÙÙŠ «Ø§Ù„اتصالات» الØ3Ø1ÙˆØ̄ية: Ù…ÙÙ ‡ÙˆÙ… التشظ1 [0.0]

[编辑]

以下是我通过浏览器调用 JSON 时得到的 JSON 数据。同样的 JSON iPhone 应用程序也可以工作。在黑莓中,我需要执行任何特定任务才能显示阿拉伯语吗?

注意:我是黑莓和 Java 的新手。

{"0":{"ArticleID":171972,"Title":"最新文章内容","ArticleText":null,"Summary": “”,“来源”:“”,“文章来源”:“”,“发布日期”:“8/10/2010”,“SummaryIsNull”:“true”,“索引”:0,“AssociatedImageID”:979,“HasAssociatedImage":"true","TitleLength":87,"优先级":0,"ArticleLink":null,"MoreArticlesCount":396,"CommentsCount":0},"1":{"ArticleID":171779,"Title":"?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????文章","ArticleText":null,"摘要":"","来源":"","ArticleSource":"","PostedDate":"8/9/2010","SummaryIsNull":"true","Index":1,"AssociatedImageID":977,"HasAssociatedImage":"true","TitleLength":102,"优先级":0,"ArticleLink":null,"MoreArticlesCount":396,"CommentsCount":0},"2":{"ArticleID":171640,"标题":"???????????????????????????????????????????????????????????????????????? "TeacherText": null,"Summary":"","Source":"","ArticleSource":"","PostedDate":"8/8/2010","SummaryIsNull":"true","Index":2,"AssociatedImageID":975,"HasAssociatedImage":"true","TitleLength":121,"优先级":0,"ArticleLink":null,“morearticlescount”:396,“commentCount”:0},“3”:{“aCTRICTID”:171371,“title”:“»»„ ,"ArticleText":null,"Summary":"","Source":"","ArticleSource":"","PostedDate":"8/5/2010","SummaryIsNull":"true","索引":3,"AssociatedImageID":974,"HasAssociatedImage":"true","TitleLength":64,"优先级":0,"ArticleLink":null,"MoreArticlesCount":396,"CommentsCount":0}}

最佳答案

阿拉伯语是最复杂的本地化案例之一。

  1. 它需要 unicode(与所有非拉丁语言一样)
  2. 它是从右到左(如希伯来语和意第绪语)
  3. 每个字母都有多种变体(分隔、开头、结尾、中间)

我认为在你的情况下,这是一侧的编码问题:发送端(服务器)损坏字符,因为没有说它们是UTF-8,或者你的黑莓设备不支持阿拉伯语。但如果你解决了这个问题,你可能会遇到#2和#3,所以要坚强!祝你好运。

关于java - Blackberry - Java - 阿拉伯语显示 JSON 输出已损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4930900/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com