[FX.php List] [off] jQuery character encoding issue - SOLVED!
Bob Patin
bob at patin.com
Wed Jan 18 14:57:20 MST 2012
Here's what I did:
At the top of my PHP page (the page that jQuery loads into the DIV), I put this line:
$html = header('Content-Type: text/html; charset=windows-1252');
and it works fine…
Hope this helps someone at some point…
Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
On Jan 18, 2012, at 3:32 PM, Bob Patin wrote:
> OK, here's one for you guys:
>
> I have a site that uses static HTML pages to display reports that the client generates using a VB parser I wrote for him 12 years ago.
>
> The HTML is pretty ugly, spawned by MS Word that he has running on an ancient Mac; the encoding it uses is Windows-1252.
>
> In their old site,which is still up until I finish this rewrite, I used ISO-8859-1; this was back in 2004 or 5 when I didn't know to use UTF-8.
>
> At any rate…
>
> I'm using jQuery, so there's only one page with a HEAD section, and I've tried changing its charset to both ISO-8859-1 and to Windows-1252, but in both cases the text in his included pages gets bad characters for all the single-quotes.
>
> Basically the entire HTML for the page is like this (slightly abbreviated):
>
> $html = '<div>some images</div><div>';
>
> include_once('html/$content'); // $content is a link to a static HTML page that I can't edit and which is encoded with Windows-1252
>
> $html .= '</div>';
>
> echo $html;
>
> I tried putting a HEAD section above all this, making it a self-contained HTML page, but it still renders wrong when I use it inside jQuery; when I load the page by itself it works fine.
>
> You won't see it in Safari, but it's in Firefox; here are 2 links where you can see it:
>
> http://v2.advantastar.com/v2_start.php?r=2000000
>
> Select any year, then a make, and then 2 vehicles in the forms as they load. On the final page you'll see the report with odd symbols in place of all the single and double quotes.
>
> Now you can try this, and you'll see a clean page:
>
> http://v2.advantastar.com/v2_comp.php?g=2011%20Saab%209-5
>
> That works fine, no problems with encoding.
>
> Any ideas? Is there a way to send an encoding command in jQuery?
>
> Thanks
>
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> AIM: longterm1954
> iChat: bobpatin
> --
> Expert FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
>
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list