Page 1 of 1

Coding of the text not correct

Posted: Mon Jan 31, 2022 5:18 pm
by Bluesman
Hi Pablo or other pro :) I have a problem when publishing a form. Some characters do not appear correctly. You can see it in the example down under.
The url to the page is: https://archivoblomberg.org/form_cat_virt.php

I have set UTF-8 to the whole site, and even checked "Force UTF-8" in the publish settings. Please how to fix this.
Language of the site is "Spanish"

Image

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 6:08 pm
by Pablo
This is most likely a server related issue.
Make sure the default_charset (in php.ini) is set to UTF-8

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 6:17 pm
by Bluesman
Pablo wrote: Mon Jan 31, 2022 6:08 pm This is most likely a server related issue.
Make sure the default_charset (in php.ini) is set to UTF-8
Ok tnx Pablo... will check with the host first...

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 10:01 pm
by Bluesman
Pablo wrote: Mon Jan 31, 2022 6:08 pm This is most likely a server related issue.
Make sure the default_charset (in php.ini) is set to UTF-8
Hi again Pablo. I have set the charset for the form to forced UTF-8 and I have set the Character set in Page properties to UTF-8. I do not really know how to check that the (php.ini) is set to UTF-8. How do I do this?

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 10:44 pm
by crispy68
You need to log onto your server, go to the PHP configuration section and look at the php info. The setting is under the core section:

Image

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 11:41 pm
by Bluesman
crispy68 wrote: Mon Jan 31, 2022 10:44 pm You need to log onto your server, go to the PHP configuration section and look at the php info. The setting is under the core section:

Image
Tnx crispy... I was checking, but I only have the ftp for publish my site on their server, so I have to talk with the server support.

Re: Coding of the text not correct

Posted: Mon Jan 31, 2022 11:58 pm
by Bluesman
I did a "PHP info" and it was set up to iso-8859-1, so I have told the host to change to UTF-8. We will see what happens...
Thanks crispy and Pablo

Re: Coding of the text not correct

Posted: Tue Feb 01, 2022 1:00 pm
by Bluesman
crispy68 wrote: Mon Jan 31, 2022 10:44 pm You need to log onto your server, go to the PHP configuration section and look at the php info. The setting is under the core section:

Image
Hi again crispy... I changed the form page to "iso-8859-1" and it works ok. The rest of the site is UTF-8. Is there a reason why UTF-8 shall be preferred before iso-8859-1. I remember 10 years agoo I did all pages with iso-8859 ?

Re: Coding of the text not correct

Posted: Tue Feb 01, 2022 1:23 pm
by crispy68
This is what I found from an article after googling it:
UTF-8 is a multibyte encoding that can represent any Unicode character. ISO 8859-1 is a single-byte encoding that can represent the first 256 Unicode characters. Both encode ASCII exactly the same way.

ISO-8859-1 is a legacy standards from back in 1980s. It can only represent 256 characters so only suitable for some languages in western world. Even for many supported languages, some characters are missing. If you create a text file in this encoding and try copy/paste some Chinese characters, you will see weird results. So in other words, don’t use it. Unicode has taken over the world and UTF-8 is pretty much the standards these days unless you have some legacy reasons (like HTTP headers which needs to compatible with everything).

Re: Coding of the text not correct

Posted: Tue Feb 01, 2022 1:30 pm
by Bluesman
crispy68 wrote: Tue Feb 01, 2022 1:23 pm This is what I found from an article after googling it:
UTF-8 is a multibyte encoding that can represent any Unicode character. ISO 8859-1 is a single-byte encoding that can represent the first 256 Unicode characters. Both encode ASCII exactly the same way.

ISO-8859-1 is a legacy standards from back in 1980s. It can only represent 256 characters so only suitable for some languages in western world. Even for many supported languages, some characters are missing. If you create a text file in this encoding and try copy/paste some Chinese characters, you will see weird results. So in other words, don’t use it. Unicode has taken over the world and UTF-8 is pretty much the standards these days unless you have some legacy reasons (like HTTP headers which needs to compatible with everything).
Tnx crispy...