Forum Moderators: coopster
I am using php 4.3.1 and the settings in php.ini are
default_mimetype = "text/html"
default_charset = "iso-8859-1"
Any help is welcome.
Thanks in advance.
Helmut
The way to convert this depends on your (programming) language, and I don't have a clue about PHP.
With Python, I'd probably go through Unicode:
text1 = 'Näherungslösung'
utext = unicode(text1, 'iso-8859-1')
text2 = utext.encode('whatever-charset-OS-X-is-using') Maybe you can figure out something equivalent for PHP... ;)
[php.net ]
to convert into different encodings.
Any idea which encoding and/or locale is used on your mysql server?
So I think your best bet is to go with Unicode. The utf8_encode should be a good function for your needs.
due to your help I got the problem solved with the preg_replace function
// Character Set change from ISO 8859-1 to Mac-Roman
$find = array("/Ä/","/ä/","/Ö/","/ö/","/Ü/","/ü/","/ß/");
$replace = array(chr(128),chr(138),chr(133),chr(154),chr(134),chr(159),chr(167));
$exportstring = preg_replace($find,$replace,$exportstring);
You were great, especially the link from Timotheos
Thanks again.
Helmut
[edited by: jatar_k at 4:50 pm (utc) on June 28, 2003]
[edit reason] once is enough thanks [/edit]