Bloc Character set on Export

I am not going to bore everyone here with the 25 msg posted on another blog trying to resolve a problem of corruption of characters between a weather application I use to generate data on my site, but I do have a question:

The developers over there are asking:
“I think you need to look at the output of your Blocs HTML page generators and see what sort of document declarations are being made and what character set the files are being generated in. I think your problem has something to do with that.”

Can anyone tell me what character set Blocs exports it’s HTML with?
At least I think that is my question…as I have stated, I am NOT a web programmer. (Becoming painfully obvious to me)

Thanks for any help.

Rich

I don’t now much about coding myself but I was thinking can’t you put it yourself in de head section of the document like that?

Just wondering…

!DOCTYPE html>

 <html lang="en"> 

 <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

Hi @WeatherguyNH, I’m not a web programmer either, but just jumping in here with a possible suggestion which may or may not be any use!
Previously formatted imports can throw things a bit. Years ago when I imported a Word doc, it showed online as absolute rubbish!
It’s best to try and import clean, unformatted plain text files wherever possible. Maybe there’s an option to export your data as plain text? Other than this, I probably can’t suggest anything else.
Best of luck.

This is interesting Ive…Thank you for passing this along. I am still wondering does Blocs render using UTF-8 or something else?

I think that is the correct question. If it is already doing that, I would not need the tag.

But what the heck do I know…Thank you!

It uses UTF-8, you can check your page here :

http://validator.w3.org/i18n-checker/check?uri=https%3A%2F%2Fwww.richlefko.com#validate-by-uri+

You are fantastic!!! Thank you!!! :grinning: :grinning: :grinning: :grinning:

I’m still curious if you solved the problem with the weather application? Don’t now with one it was that gives you troubles, so it is difficult to assess what can cause the problem.

I have not. Your information helped move the investigation along, but whatever the weather app changes when it uploads to fill in the tags, corrupts any “degree characters” “°” that I type in a text box. really strange because the upload of the data will put a degree symbol in there where IT fills in a reading, like current temperature.
You can see how it corrupts the degree symbol on this page.
https://www.richlefko.com/almanacs.html
There are NO tags on this page, but I guess the applications scans the site looking for tags to populate. Then it changes my degree symbols to lines and question marks.
I may have to figure out a work around.
Complicated to explain here since I’d need to explain more about the weather app. Basically, you put tags like “CT$” or “BTTEXT$” and the application pulls that info from my weather instruments populates the page online for real time readings.
I “think” others on the sites blog have been able to reproduce this…but I am not sure.

Thank you again for the interest and your help…

Rich

I was looking deeper into it and it seems that the most common problem with corruption of characters is due to not having the same characters encoding between the data and the HTML, both have to be the same. I’m no coder, but a long time ago when a went to school and remember I pulled out my hair quite often when learning how to code :slight_smile:
I hope the developer can solve your problem, the last time a checked the site de degree symbol is displayed correctly. Just wondering why it is not showing de Fahrenheit.
But nice work, that you share your passion for weather with such great enthusiasm. I like the spirit!

“Weather” has been a hobby and passion for me since I was a kid. (A LONG time ago)
It is fun that many people also share this interest, so sharing is fun and I have actually helped people in storm situations, so I feel like I am doing some good.

Yes, I agree that the encoding seems to be the key. One person on that site kept insisting that the problem was with Blocs, but a couple of others set up a sample page using whatever App they use, and got similar results.
The application I am using “Weathercat” has an option to target specific web pages, so I tried that over the past few days, and it seems to be working. I just have to remember that on those pages, I can’t type the degree symbol…but I am satisfied with how it is working at the moment.
Again, thank you for your interest and your help!

Much appreciated…

Rich

1 Like

Hi All:

This mis what I am being told by the folks associated with that weather app.

“To make the change requires 2 things. The actual encoding of the text needs to change from 8-bit characters to 16. Also the meta-tag needs to change to one looking like my example: . In my case, I was able to get BBEdit to do this for me. I would hope that Blocs has something equivalent, but you will need to dig into the documentation a little bit. This is the sort of thing that shouldn’t be too uncommon. Many foreign languages require Unicode 16 and there is a large collection of emoticons only available under Unicode 16.”

Is there a way to accomplish this in Blocs?

Thanks all…

Rich

You can’t change it as a setting in blocs since plain simple UTF-8 is basically the encoding used in web dev and specially in html it is simply the suggested encoding to use - never seen a UTF-16 encoded html site. But it shouldn’t be impossible.

You can try to edit that tag in the exported site (in the respective head section of the html documents) where it says charset=“utf-8” and change that to utf-16

I really have no idea what will happen to the rest of the content - you’ll need to try and see if the “normally text still works after that change

I think simpler would be to find a UTF-8 character for that degree symbol and use it, instead. This is just a hunch but maybe with a converter you could do convert the existing symbol to utf 8?

Don’t know much about Blocs, but using “unusual” characters in text often results in problems when rendered in HTML. The best is to substitute HTML entities for such charaters. See Complete list of HTML entities - FreeFormatter.com

Thanks for the suggestion. It isn’t really what “I” am typing into Blocs that is the problem, it is this application that changes embedded “tags” within the document.
All else works fine, including where I type in the temperature symbol.

There does not seem to be an easy way to remedy this problem.

Thanks again…

Rich

I have tried every character combination I can find to see if this if it will play nice with this weather application.
None of them work…they seem to think it is the UTC-8 vs UTC-16 issue.

Thank you for the link…

How would I edit that?

“You can try to edit that tag in the exported site (in the respective head section of the html documents) where it says charset=“utf-8” and change that to utf-16”

Rich

By using a free Html editor like Brackets or Visual Studio Code. Open your exported site in the program and edit the tag. Then re-upload your edited site back to your server.

1 Like

Cool!

Thank you Ive…

Rich