Refuge Isle wrote:The standard nation API call appears to occasionally deliver a different response than a call to the motto shard, specifically, when it comes to certain special characters:
https://www.nationstates.net/cgi-bin/ap ... opireistan
> It's pronounced /'apôrt-is-tō-pirī-stan/.
https://www.nationstates.net/cgi-bin/ap ... an&q=motto
> It's pronounced /'apôrt-is-tō-pirī-stan/.
Wait, no, that's incorrect. I checked the actual exact bytes for the latter link, which turns out to be "/'apôrt-is-tō-pirī-stan/". In other words, the server is double-encoding the string: first transforming "ō" to "ō" (which is correct), but then re-transforming "&" to "&" (which is incorrect, and will cause XML parsers to think the ampersand is "actually supposed to be there" instead of a character entity reference). Interestingly, the first link performs neither transformation (transmitting the string directly in UTF-8), so there's somehow two different steps that get added between the two.
I'm