Encode String with UTF-8 in GWT

2019-04-08 17:16发布

问题:

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



标签: gwt utf-8