Code: Select all
ReportsCode: Select all
/ReportsModerator: mcrossley
Code: Select all
ReportsCode: Select all
/ReportsThanks Freddie. I've made this correction and we'll see how it goes tonight.freddie wrote: ↑Fri 17 Mar 2023 3:16 pm Looks like the path used. It should be:Not:Code: Select all
ReportsCode: Select all
/Reports
Code: Select all
// NASTY work-around, the ONLY way I find black diamond question mark (or deg character)
$checkIt = explode("(", $rpt);
$dodgy = substr($checkIt[1],0 , 1);
// the ONLY way I can replace when black diamond (unconditionally) to °
$rpt = str_replace($dodgy,'°',$rpt);
// END nasty work around
echo "<pre>\n";
$rpt = preg_replace('/State: Dorset/i', 'County: Dorset Country: UK', $rpt, 1);
echo preg_replace('|<|Uis','<',$rpt);
echo "</pre>\n";only the second solution worked for me for my Saratoga Templates, yet on my CumulusMX templates they just work, and use the same NOAA report files!So, there's two ways to do this:
1) (easy) force the wxnoaareports.php page to use UTF-8.
Just add
Code: [Select]
$useUTF8 = true;
before the include("top.php");
and the page will display in UTF-8.
2) (a bit harder) change include-NOAA-reports.php
Code: [Select]
$rpt = preg_replace('|°|Uis','°',$rpt);
echo $rpt;
to
Code: [Select]
// $rpt = preg_replace('|°|Uis','°',$rpt);
$rpt = iconv('UTF-8',$SITE['charset'].'//TRANSLIT',$rpt);
echo $rpt;
and that should convert the degree sign for you.
If I turn off PHP uploads and go back to FTP, it works fine.
If i turn on php upload i don't have the non-utf8 reports.
And I claim two cases which contradict your statement:
(Note that he uses FTP).For the new version of CMX nice progress but it forced me to review each of my pages because the months with accents like February August December were all distorted I have the impression that MX no longer transmits in UTF 8.
I am not arguing with you, Thanks. I am arguing the issue is not what it seems by some and that means that the solution brought by Mark will most likely not solve it. I argue for the community, the tool, CMX. Thanks for understanding. Thanks.