Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Problem with accented letters in scrolling text
Moderator: mcrossley
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Problem with accented letters in scrolling text
Hello Everyone!!
I have problem with scrolling text in Gauges status bar on my site.
I live in Norway and we use accented letters like æ, ø and å
You can see my problem at http://jensskogan.com/ss_gauges.php, if the forecas contains accented letters.
Then the forecast contains letters like "æøå "they shows up wrong
I have tryed to to set "digitalForecast : false," in gauges.js, but this do not help
Anyone have a good idea what to do to solve this problem
Best regards
Tore Olsen
I have problem with scrolling text in Gauges status bar on my site.
I live in Norway and we use accented letters like æ, ø and å
You can see my problem at http://jensskogan.com/ss_gauges.php, if the forecas contains accented letters.
Then the forecast contains letters like "æøå "they shows up wrong
I have tryed to to set "digitalForecast : false," in gauges.js, but this do not help
Anyone have a good idea what to do to solve this problem
Best regards
Tore Olsen
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
Typically, there are no extended characters in the forecast at the moment. But I think the problem may be that the realtimegauges.txt file is being sent as "text/plain" which normally defaults to ANSI character set on web servers. If you create (amend existing) .htaccess file to add an extended character set for all .txt files it may fix it.
For instance on my Apache web server I have added additional character sets in overall httpd.conf file (and made utf-8 the default)...
AddDefaultCharset utf-8
AddCharset windows-1252
Then in the NOAA reports folder I have added a .htaccess file to send the the NOAA reports in windows-1252 format...
AddCharset windows-1252 .txt
For instance on my Apache web server I have added additional character sets in overall httpd.conf file (and made utf-8 the default)...
AddDefaultCharset utf-8
AddCharset windows-1252
Then in the NOAA reports folder I have added a .htaccess file to send the the NOAA reports in windows-1252 format...
AddCharset windows-1252 .txt
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello Mark
I have tried all your sugestions whit no luck, if i try to set in character sets in overall httpd.conf file
AddDefaultCharset utf-8
AddCharset iso-8859-1
the whole website goes down.
At the moment i have "tweeked" the forecast so it shows accented letters so if you have a different solution it would be great
BTW! I run a local weserver using XAMPP
Best Regards
Tore
I have tried all your sugestions whit no luck, if i try to set in character sets in overall httpd.conf file
AddDefaultCharset utf-8
AddCharset iso-8859-1
the whole website goes down.
At the moment i have "tweeked" the forecast so it shows accented letters so if you have a different solution it would be great
BTW! I run a local weserver using XAMPP
Best Regards
Tore
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
I've just taken a look at teh code - always a good idea - and I see that I already applied a workaround for this. The realtimegauges.txt file uses the HTML encoded version of the forecast string. So it comes through as...
This is then placed in a div on the DOM, and the text read back from the div...
However, what is being read back from the div is...
Which I think is because the base page is not in the default UTF-8 encoding.
You seem to have lost the encoding instruction from the pages HTML header, and the web server is not returning the base encoding in the response header either.
<meta charset="utf-8">
Code: Select all
"Stormfullt, mye nedbør"
Code: Select all
data.forecast = $('<div/>').html(data.forecast).text();
Code: Select all
"Stormfullt, mye nedbør"
You seem to have lost the encoding instruction from the pages HTML header, and the web server is not returning the base encoding in the response header either.
<meta charset="utf-8">
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello Again
I have tested and tested over again, and i am 100% sure that the page is in UTF-8
Do you have any idea for me to try out, i am a novise in php, so what i do is to try out all the ideas i get
Hopfylly i someday get this right
Regards
Tore
I have tested and tested over again, and i am 100% sure that the page is in UTF-8
Do you have any idea for me to try out, i am a novise in php, so what i do is to try out all the ideas i get
Hopfylly i someday get this right
Regards
Tore
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
Your server is sending the following response header:
Mine sends:
Can you create a .htaccess file in the same folder as the ss_gauges.php ?
If so try adding the following entry:
That will force just the gauges page to be sent as utf-8 encoded, see what happens then...
Code: Select all
Content-Type: text/html
Code: Select all
Content-Type: text/html; charset=utf-8
If so try adding the following entry:
Code: Select all
AddCharset utf-8 ss_gauges.php
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello again Mark
The .htaccess did not work
I have even try to change webserver from XAMPP to WAMP, but it is the same
This is a mystery,, i am out of ideas here.
Regards
Tore
The .htaccess did not work
I have even try to change webserver from XAMPP to WAMP, but it is the same
This is a mystery,, i am out of ideas here.
Regards
Tore
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
I overlooked this... Is it the PHP? Try setting the response header in your PHP script (check any existing headers)...
Code: Select all
<?php
header('Content-type: text/html; charset=utf-8');
?>
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hei Mark
I am sorry but no luck
Tore
I am sorry but no luck
Tore
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
Tore, I don't understand this, the header being sent is still just "Content-Type:text/html" from my limited understanding of PHP if you have the code "header('Content-type: text/html; charset=utf-8');" it should be reflected in the header sent. Is there an option in your PHP to view the source code?
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello Mark
Please finde attached "ss_gauges.php", its in a .zip file.
Maby you could se whats wrong in the source code
Regards
Tore
Please finde attached "ss_gauges.php", its in a .zip file.
Maby you could se whats wrong in the source code
Regards
Tore
You do not have the required permissions to view the files attached to this post.
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
Hmm, my only suggestion would be to move just the single header line to immediately after
// Include language files available in lang folder
include('include/local_lang.php');
at lines 29/30
and delete the three lines you have put at the top of the script.
(I cannot see what the included files are doing, they may be over riding the header statement you have put at the top of the script.)
// Include language files available in lang folder
include('include/local_lang.php');
at lines 29/30
and delete the three lines you have put at the top of the script.
(I cannot see what the included files are doing, they may be over riding the header statement you have put at the top of the script.)
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello again Mark
Did the changes you aske me to do, see the attached file
That did not help!!
I guess this means that its not possible to solve this problem
Have a great day
Tore
Did the changes you aske me to do, see the attached file
That did not help!!
I guess this means that its not possible to solve this problem
Have a great day
Tore
You do not have the required permissions to view the files attached to this post.
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Problem with accented letters in scrolling text
Never say that! It is working for other people using extended language characters.I guess this means that its not possible to solve this problem
I have run this through the bugger, and manually looked up the character codes, and guess what? The code is working!
Your current forecast is "Pent vær"
This is being converted to "Pent vær"
à = Ã
¦ = ¦
So the web page decode has been working all along, it looks like the problem may lie at the Cumulus end.
Can you check your "strings.ini" file, are the strings correct in there?
Does the correct string appear in Cumulus its self?
How does the "Pent vær" appear in strings.ini?
In fact it may be worth posting your strings.ini 'as-is'.
-
- Posts: 15
- Joined: Tue 23 Apr 2013 11:43 am
- Weather Station: Fine Offset 2080
- Operating System: OSX Yosemit Version 10.10.3
- Location: Norway
- Contact:
Re: Problem with accented letters in scrolling text
Hello again Mark
I think you are correct
Does the correct string appear in Cumulus its self? you ask, and the answer is NO, i got the same issue there.
The strings.ini seems correct translated into Norwegian
I attach the strings.ini
Best regards
Tore
I think you are correct
Does the correct string appear in Cumulus its self? you ask, and the answer is NO, i got the same issue there.
The strings.ini seems correct translated into Norwegian
I attach the strings.ini
Best regards
Tore
You do not have the required permissions to view the files attached to this post.