id summary reporter owner description type status priority milestone component resolution keywords cc 850 Encoding problems with JSON data Nicklas Nordborg Nicklas Nordborg "The Firefox update to Firefox 44.0.2 seems to have broken the encoding/decoding of JSON data that is posted between the browser and Reggie servlets. This was discovered by swedish letters `åäö` being stored as `åäö`. Investigations showed that: * Reggie sets `Content-Type: application/json` request header when posting JSON data. * Firefox 43 automatically add UTF-8 to this: `Content-Type: application/json; charset=UTF-8` * Firefox 44 doesn't add anyting * If we don't set any `Content-Type` header at all, Firefox (both versions) automatically set: `Content-Type: text/plain;charset=UTF-8` * If a charset has been set, Tomcat uses that encoding but uses Latin1 otherwise. This is what caused the corruption of swedish letters. There are several solutions: * We can let Reggie explicitly set `charset=UTF-8` when posting JSON data. * We can explicitly tell Tomcat to use UTF-8 when parsing the JSON data. * Both of the above! " defect closed blocker Reggie v4.1.1 net.sf.basedb.reggie fixed