Encode String with UTF-8 in GWT

旧巷老猫 提交于 2020-01-01 11:02:10

问题


Is there a way to encode a String with UTF-8 in GWT? In other words, is there a GWT-compatible equivalent to java.net.URLEncoder.encode(toEncode, "UTF-8")?


回答1:


Yes, it's com.google.gwt.http.client.Url.encode(), JavaDoc: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/URL.html



来源:https://stackoverflow.com/questions/1139698/encode-string-with-utf-8-in-gwt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!