Good evening.
I’m trying to make a small website for our small boat harbour. We have a Davis weather station, and uses WDL. Found Steel series and loved it
Got almost evertyhing to work, except the LCD on the top. In Norwegian, we have the letters
OK, this hasn’t been an easy one to crack, it is down to the various character set encodings at work. With Cumulus it is worked around by URI encoding the forecast string, the script then decodes it again before use.
I think the choice of using a .txt file extension for the realtime data files may have been a mistake. In your case the forecast seems to be Windows-1252 encoded. So a workaround for your case may be (not fully tested) to change gauges.js. Around line 993 you should find the getRealtime function:
getRealtime = function () {
setStatus(strings.StatusMsg);
_count = 11; // 10 seconds timeout
countDown();
$.ajax({url: config.realTimeURL,
dataType: 'text',
cache: false,
success: checkRtResp,
error: checkRtError,
timeout: 10000
});
},
Change that function as follows:
getRealtime = function () {
setStatus(strings.StatusMsg);
_count = 11; // 10 seconds timeout
countDown();
$.ajax({url: config.realTimeURL,
dataType: 'text',
cache: false,
beforeSend: function( xhr ) {
xhr.overrideMimeType( "text/plain; charset=Windows-1252" );
},
success: checkRtResp,
error: checkRtError,
timeout: 10000
});
},
I think that may work for your case. I need to sort out a more general solution for this problem though.
Been playing with this today with a bit of cofee and baileys
The files are ANSI. if I open them in Notepad and save as UTF-8 → Works perfect. But offcourse the files is overwritten when next upload occurs
I will try Your fix tomorrow. My wife says I have to go to a party rather than fiddeling with this. Hmmppff.
Best regards from Norway
Bavaria32sport
It worked !!
Thanks Just sent 25 GBP via Paypal.
best regards
Bavaria32sport