How to fix the character set (charset) issue

Glad a fix was found. That was starting to become a problem. :grinning:

1 Like

thank you for your reply
I understand pretty well what you say, consider that my site has been developed with codeigniter, I create a folder named convert in mywebsite / forget it is in the folder public_html?

Then if I move the files on which I want to apply the conversion to the convert folder, will the referencing in my controller code for example ($this->load->view(‘my_page’) ) always work? Or after conversion, do I have to re-file the files in the view folder so that it works?

The conversion only changes the string matched inside the document(s) with the extension you provided.

For example: Your documents have .html extension

If you had this code: ($this->load->view('my_page.html') )
It will become ($this->load->view('my_page.php') )

If your documents already had .php extension, nothing will be changed, except the provided character set :wink:

This gives the option to convert all link extensions from .htm to .php
This is good for internal links, but, it would also convert all links to external sites, the external links would then be ‘dead’.

It would be more useful to have 000webhost’s servers not specifying the character set within the transfer protocol.

i do not understand this

@hassanmaleki
See ISO-8859-1 is not showing letters with accents

A simpler solution that worked for me, is adding the following line to the websites .htaccess file:

AddCharset iso-8859-1 .html .htm

This will override the servers default charset with ISO-8859-1 on all documents with a .html or .htm extension

1 Like

For me,
AddDefaultCharset off
works fine.

I was not aware this could be done using .htaccess

Thank you! :smiley:


I have updated the tutorial. No need for extra files to be downloaded.

Many thanks to @panterhz ! :wink:

bsananda asked me “how do you do this?” concerning my statement “For me, AddDefaultCharset off works fine”. A description of what I did follows.
There was a file .htaccess in the root directory of my site, and it consisted of the four lines between the horizontal rules below (an empty first one taken into account):


HTID:1162044: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW

php_value display_errors 1
# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:1162044:

I modified the file in question by adding the following line after the last one:
AddDefaultCharset off

buenas tardes de que me habla cuando ud me dice que ya no era conciente de lo que estaba sucediendo ?

I am sorry, could you please rephrase or post in english?

I did not catch that…

how do you do this?
how do you do this

Modified it how?
with what application?
text doesn’t work
because windows doesn’t allow me to save a file
without designation

Go to 000webhost cPanel > Your website > File Manager > /public_html > double click on .htaccess
and add to a new line:

AddDefaultCharset off

Right now
the file manager
only shows error 200
part of the file manager problem
on my free website

What is your website URL? :confused:

dabase.org
dabase.org

Hmm… There may be some issues with File Manager because of network downtime.

I’ll contact the admins about it. Meanwhile, please try again later :wink:

I tried adding the “AddDefaultCharset off” line as well, and it seems to be a better alternative, especially if the charset to be used already is specified in the html files.

1 Like

AddDefaultCharset off - worked for me as well.
I suggest this thread be moved back out of tutorials, and a new tutorial thread be started.

3 Likes