Author Topic: characterset in wxquake.php <> quake-json.php  (Read 244 times)

0 Members and 1 Guest are viewing this topic.

Offline zmarfak

  • Contributor
  • ***
  • Posts: 132
    • Matar
characterset in wxquake.php <> quake-json.php
« on: June 21, 2020, 03:19:28 AM »
Hi,
when I looked today to https://www.matar.be/weather/wxquake.php you see that there is a "badtranslation" between wxquake.php and quake-json.php.
Looking at https://www.matar.be/weather/quake-json.php this seems ok .
The quake-json.php is included in wxquake.php
Code: [Select]
include_once("quake-json.php");example in quakejson.txt in cache directory :
Code: [Select]
Siglufj\u00f6r\u00f0urCan I correct this ?
In both pages there is :
Code: [Select]
charset=ISO-8859-1
I add screenshots here.

Thanks for anyhelp
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: characterset in wxquake.php <> quake-json.php
« Reply #1 on: June 21, 2020, 12:01:41 PM »
The quake-json.php doesn't have any iconv() to change from the USGS UTF8 to another character set.

Try changing wxquake.php
Code: [Select]
include("top.php"); to
Code: [Select]
$useUTF8 = true;
include("top.php");
and that will cause the entire page to be rendered in UTF8 (and automatically change any language-LL.txt, language-LL.js to UTF8 for this page also).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 132
    • Matar
Re: characterset in wxquake.php <> quake-json.php
« Reply #2 on: June 21, 2020, 12:26:11 PM »
Hi Ken,
thank you, that works very well.
Solved now.  [tup]
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline zmarfak

  • Contributor
  • ***
  • Posts: 132
    • Matar
Re: characterset in wxquake.php <> quake-json.php
« Reply #3 on: June 21, 2020, 01:21:44 PM »
This solution solves another "problem" I had.
Meteobridge creates those "dynamic chart" where you can see the values when you scroll over the chart.
I had to embed these in an iframe to have the correct display of some characters.
With this solution I can avoid the iframe and use an include statement.

eg https://www.matar.be/weather/wxmbdaily.php
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

 

anything