Re: Wierd PHP/MySQL result

2009-09-22 Thread Mogens Melander
Yes, you are right. It's the json_encode that fail. It's strange though. The data that fail is "Humlebæk". Another query, in another form, returning "Værksted" don't fail in json_encode. echo $cust['oname'];give the correct value. On Tue, September 22, 2009 22:56, Mark Goodge wrote: > Mogen

Re: Wierd PHP/MySQL result

2009-09-22 Thread Mark Goodge
Mogens Melander wrote: Well, no typos. The relevant piece of code: if (! $cust = mysql_fetch_assoc($res)) { echo "{success: false, errors: { reason: 'Fetch Customer failed: " . htmlspecialchars(mysql_error(),ENT_QUOTES) . "" . htmlspecialchars($sql,ENT_QU

Re: Wierd PHP/MySQL result (Solved)

2009-09-22 Thread Mogens Melander
Ok, i got it. It's the json_encode($cust) that seems to have problems with danish characters ( æ ø å Æ Ø Å ). json_encode is supposed to work with utf8 only, and my tables are all utf8 so that's wierd too :( Seems like i get to do the json_encoding by hand. On Tue, September 22, 2009 22:35, Mog

Re: Wierd PHP/MySQL result

2009-09-22 Thread Mogens Melander
Well, no typos. The relevant piece of code: if (! $cust = mysql_fetch_assoc($res)) { echo "{success: false, errors: { reason: 'Fetch Customer failed: " . htmlspecialchars(mysql_error(),ENT_QUOTES) . "" . htmlspecialchars($sql,ENT_QUOTES) . "'}}"; } else {