Author Topic: UTF-8 Encoding error - and no custom graphs  (Read 3846 times)

Barzi

  • Gentle Breeze
  • **
  • Posts: 36
    • DW4725
    • IFRIBURG2
    • M?t?o Sommentier
  • Station Details: Davis Vantage Vue | WeatherLink USB MAC | Mac Mini end 2009 with 500 Gb SSD & Mac OS 10.11
UTF-8 Encoding error - and no custom graphs
« on: April 21, 2012, 07:53:20 AM »
Hi!

I'm working on a new Template in French. But I've some terrible problems.

The first one is encoding. As usual, I use UTF-8 as file encoding, to display properly accent (?, ?, ?, ...)

But... if you see this: http://www.sommentier.ch/test/, you can see that WeatherCat don't manage UTF-8 files.

I've tried Western Windows Latin encoding: not better: http://www.sommentier.ch/test/graph.php

So, I've tried Western Mac OS Roman encoding: it's work: http://www.sommentier.ch/test/week.php


Why don't use Mac OS Roman encoding? Because all the rest of the website is in UTF-8; the better encoding for French. Only the datas are send by WeatherCat. The header and the footer of the website is in UTF-8.

So, my question: how can I do, to manage UTF-8 custom web pages with WeatherCat?


Second problem:

As you can see, the tags CUSTOMGRAPH$11$ are juste replaced by the customgraph11.jpg name, without the html code. I've this problem only on theses new custom webpages, not on the "regular", as you can see it here: http://www.sommentier.ch/meteo/

In attachments, the new pages.


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: UTF-8 Encoding error - and no custom graphs
« Reply #1 on: April 21, 2012, 08:30:56 AM »
Hi Barzi,
At the moment, the only encoding that will work is Mac OS Roman - UTF-8 should work in the future  (v1.1).

I don't see the second problem on your page, perhaps you've removed it, but if CUSTOMGRAPH$11$ doesn't work, that'd be a bug, and I'll add it to the list.

Cheers,
Stu.



Barzi

  • Gentle Breeze
  • **
  • Posts: 36
    • DW4725
    • IFRIBURG2
    • M?t?o Sommentier
  • Station Details: Davis Vantage Vue | WeatherLink USB MAC | Mac Mini end 2009 with 500 Gb SSD & Mac OS 10.11
Re: UTF-8 Encoding error - and no custom graphs
« Reply #2 on: April 21, 2012, 08:33:41 AM »
Thank you Stu. For the moment, I'll encode the pages in Mac OS Roman.

And sorry for the bad link: the right link is here: http://www.sommentier.ch/test/ You can see that there is no graph displaying. I don't understand why.

Barzi

  • Gentle Breeze
  • **
  • Posts: 36
    • DW4725
    • IFRIBURG2
    • M?t?o Sommentier
  • Station Details: Davis Vantage Vue | WeatherLink USB MAC | Mac Mini end 2009 with 500 Gb SSD & Mac OS 10.11
Re: UTF-8 Encoding error - and no custom graphs
« Reply #3 on: April 21, 2012, 03:43:16 PM »
I become crazy!  [banghead]

I've tried many different way to display the custom graph on the donnees-php and donnees_week.php custom web page. It doesn't work!

http://www.sommentier.ch/test/

http://www.sommentier.ch/test/week.php

But, the alltags.html file work! http://www.sommentier.ch/test/alltags.html

Is it because I use php files?

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: UTF-8 Encoding error - and no custom graphs
« Reply #4 on: April 21, 2012, 04:58:32 PM »
Hi Barzi,
Yes, the tags are replaced differently in a php file.

Normally, WeatherCat replaces the tag with some html to link to the file - something like:
<img src="customgraph3.jpg" alt="customgraph3.jpg">

In a php file it replaces the tag with just the filename.

Hope this helps,
Stu.



Barzi

  • Gentle Breeze
  • **
  • Posts: 36
    • DW4725
    • IFRIBURG2
    • M?t?o Sommentier
  • Station Details: Davis Vantage Vue | WeatherLink USB MAC | Mac Mini end 2009 with 500 Gb SSD & Mac OS 10.11
Re: UTF-8 Encoding error - and no custom graphs
« Reply #5 on: April 21, 2012, 05:18:55 PM »
Yes! So, it's a feature, not a bug  ;D

I'll code it myself. The new French template will be ready in a few days.

Thank you Stu.


EDIT

Ok, it's work! You can see the result here: http://www.sommentier.ch/meteo/

The template is very simple, well commented, easy to customize. I'll finalize it and publish it here.

Thank you for your help, Stu.