I have a small problem here.
I started ages ago doing all my pages in ISO-8859-1 and then later in ISO-8859-15
After a few years I installed some pieces of software in those pages that were working in UTF-8 because I was not aware at the time of the problems of different encodings.
With the years everything in all my pages have been going worst and worst with mixed encodings all over the place, and it's even worst because there are lots of different programs with bridges connecting all of them.
So I already decided some time ago to sort that out deciding to leave just one encoding and changing every thing with a different one, but was not decided which one I should leave until I learned you were doing Wedge with only UTF-8. Since then I have already been changing all the pages and the databases I have in ISO-8859-15 to UTF-8.
Doing this, when I am ready to move all of them to Wedge it will be easier for me.
The problem I have is everything is so mixed up and have relations all over the place that sometimes I have a situation like this one:
Imaging I have a database that used to be in ISO-8859-15 and I am getting data from that database and displaying it in a lot of different pages.
I have already changed all the data inside the DB to UTF-8, but I have only changed some of the pages to UTF-8. Some of the pages are still in ISO-8859-15, so I need to convert the data to ISO-8859-15 before displaying it in those page.
What I have done is something like:
Code: [Select]
This is working for me, but today I was trying to help a guy that has exactly my same problem, I tried to do exactly that same trick and he got an error saying the function iconv() was not defined.
So I went to the manual and found out that function is not installed by default in all the PHP installations, but it's in an optional package and obviously it's not installed in this guy's server.
Now, the problem is that's the only function I knew to do the conversions from one encoding to another and that's the one I have been always using.
I have been checking the manual and cannot find another one to do the same job.
Any ideas?
I started ages ago doing all my pages in ISO-8859-1 and then later in ISO-8859-15
After a few years I installed some pieces of software in those pages that were working in UTF-8 because I was not aware at the time of the problems of different encodings.
With the years everything in all my pages have been going worst and worst with mixed encodings all over the place, and it's even worst because there are lots of different programs with bridges connecting all of them.
So I already decided some time ago to sort that out deciding to leave just one encoding and changing every thing with a different one, but was not decided which one I should leave until I learned you were doing Wedge with only UTF-8. Since then I have already been changing all the pages and the databases I have in ISO-8859-15 to UTF-8.
Doing this, when I am ready to move all of them to Wedge it will be easier for me.
The problem I have is everything is so mixed up and have relations all over the place that sometimes I have a situation like this one:
Imaging I have a database that used to be in ISO-8859-15 and I am getting data from that database and displaying it in a lot of different pages.
I have already changed all the data inside the DB to UTF-8, but I have only changed some of the pages to UTF-8. Some of the pages are still in ISO-8859-15, so I need to convert the data to ISO-8859-15 before displaying it in those page.
What I have done is something like:
if ($context['character_set'] != 'UTF-8')
$data_text = iconv("UTF-8", "ISO-8859-15", $data_text);
This is working for me, but today I was trying to help a guy that has exactly my same problem, I tried to do exactly that same trick and he got an error saying the function iconv() was not defined.
So I went to the manual and found out that function is not installed by default in all the PHP installations, but it's in an optional package and obviously it's not installed in this guy's server.
Now, the problem is that's the only function I knew to do the conversions from one encoding to another and that's the one I have been always using.
I have been checking the manual and cannot find another one to do the same job.
Any ideas?