<div class="gmail_quote">I had a character encoding issue that I finally solved, but I don't understand why the fix works. I'm hoping someone can explain this to me!<br><br>The issue was that non-ascii chars were appearing as junk BUT only when retrieved via ajax calls. Otherwise, they displayed fine. The junk display was due to them being interpreted as ISO-8859-1, but I could not figure out why the browser was interpreting that way. All my data is handled as UTF-8.<br>
<br>The problem was fixed by calling utf8::decode on the data prior to sending back via ajax. BUT WHY?<br><br>I am using the JSON view to render ajax responses, and it sets the charset header correctly to UTF-8. Of course, even when you decode, perl still represents as "internal" utf8. But why should this be necessary?<br>
<br>Thanks!<br><font color="#888888"><br><br clear="all"></font></div><br>-- <br>==========================<br><a href="http://www.bikewise.org">http://www.bikewise.org</a><br><br>2People citizen's network for climate action: <a href="http://www.2people.org">http://www.2people.org</a><br>
<br>Greater Seattle Climate Dialogues: <a href="http://www.climatedialogues.org">http://www.climatedialogues.org</a><br>==========================<br>