I've been pulling my hair out for hours… I'm hoping someone has an idea.
I'm pulling data down from Google Places that has UTF-8 encoded characters in it. When I try to display it in WO/WOnder, the special characters turn into question marks.
ERXResponse.setDefaultEncoding("UTF8");
ERXResponse.setDefaultHeaderEncoding("UTF8");
WOMessage.setDefaultEncoding("UTF8");
public void takeValuesFromRequest(WORequest r, WOContext c) {
r.setDefaultFormValueEncoding("UTF8");
super.takeValuesFromRequest(r,c);
}
public void appendToResponse(WOResponse r, WOContext c) {
r.setContentEncoding("UTF8");
super.appendToResponse(r,c);
r.setHeader("text/html;charset=utf-8", "Content-Type");
}
private boolean enableUTFEncoding = false;
public void enableUTFEncoding() {
enableUTFEncoding = true;
WOMessage.setDefaultEncoding(_NSUtilities.UTF8StringEncoding);
}