0

So I've been driving myself up a wall trying to find the difference between the way two AMCharts setups are handling locale changes.

When switched to German, our numbers are returning as 1234,56 instead of 1234.56 in the XML.

This only seems to happen in one particular place, and of course, running the same code locally produces the expected formatting.

I'm hoping there some simple difference in the nginx/PHP setup that I'm overlooking.

  • It's not clear from your question how you obtain the XML. Chances are however - but only if you retrieve the XML - headers and other parts of the request hint nothing so leave the server a choice of locale based on content requested. Compare with this Q&A: [Strange Characters In XML Response From Google Weather API Error](http://stackoverflow.com/q/8176726/367456) – hakre May 08 '15 at 16:00
  • Thanks for the poke in the right direction hakre, the servers had different locales defined (seen in `locale -a`), and it being defined was causing the replacements. – user3058773 May 08 '15 at 16:55
  • That's interesting. Can you show the method how you retreived the data (e.g. with file_get_contents or curl_ functions etc.). And did you change the locale on the system level or within PHP? – hakre May 09 '15 at 06:29

0 Answers0