Coding of the text not correct

Issues related to forms.
Post Reply
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Coding of the text not correct

Post 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
"Make My Day"

See my Website
User avatar
Pablo
 
Posts: 23571
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Coding of the text not correct

Post by Pablo »

This is most likely a server related issue.
Make sure the default_charset (in php.ini) is set to UTF-8
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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...
"Make My Day"

See my Website
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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?
"Make My Day"

See my Website
User avatar
crispy68
 
 
Posts: 3086
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Coding of the text not correct

Post 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
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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.
"Make My Day"

See my Website
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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
"Make My Day"

See my Website
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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 ?
"Make My Day"

See my Website
User avatar
crispy68
 
 
Posts: 3086
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Coding of the text not correct

Post 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).
User avatar
Bluesman
 
 
Posts: 1204
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Coding of the text not correct

Post 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...
"Make My Day"

See my Website
Post Reply