从 Apache CouchDB 1.6.1 获取印地语数据

Get Hindi data from Apache CouchDB 1.6.1

我正在使用 Apache CouchDB 1.6.1 作为我的数据库。我们正在创建测验并将问题数据保存在 couchdb 中。现在,有些用户想用印地语创建问题。数据很容易保存在 couchdb 中,但是从 couchdb 检索数据时,它会被转换成一些荒谬的字体。可能是字体系列有问题,我对此一无所知。

我们在项目中使用 JavaGwt

 public String getData(){
        Session session = new Session("192.168.1.70", 5984);
        String hindiresult=null;
        try{
            Database test = session.getDatabase("test");
            Document testdoc = test.getDocument("testdoc");
            hindiresult=testdoc.getString("hindifield");

        }catch(Exception e){
            e.printStackTrace();
        }
        return hindiresult;
    }
}

这是我们的服务器端代码,在此处获取数据并将其返回给处于警报状态的客户端。图片我已经分享了。

您需要使用 utf-8 编码以支持印地语。

我刚刚将以下问题中建议的 Eclipse Ide 的编码从默认更改为 utf-8。 HELPFUL LINK