有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

安卓 GCM Java服务器:发送带有重音字符的消息

我尝试发送带有重音字符的消息,对于测试,我使用一个简单字符串:

        String message ="éèàôaaaa";

我的GCM Java服务器源代码:

        // use this line to send message with payload data
        Message message = new Message.Builder()
            .collapseKey("1")
            .timeToLive(3)
            .delayWhileIdle(true)
            .addData("Alerte : ",   message)
            .build();

在使用eclipse的OSX上: 推送消息后,在我的设备(xperia s和nexus 7)上,状态栏中有“?”aaaa“

在使用eclipse的Windows7上: 推送消息后,在我的设备(xperia s和nexus 7)的状态栏中显示“aaaa”

有什么想法吗


共 (1) 个答案

  1. # 1 楼答案

    这是因为您的unicode字符对于URL不安全,请参阅我的其他answer。这同样适用于你的问题