Login   Register  
PHP Classes
elePHPant
Icontem

Problem opening map file

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      UTF8  >  All threads  >  Problem opening map file  >  (Un) Subscribe thread alerts  
Subject:Problem opening map file
Summary:Error: ERR_OPEN_MAP_FILE : Error openning file: ISO88591.MAP
Messages:2
Author:Rene Fouquet
Date:2005-01-28 11:01:13
Update:2005-01-30 20:31:34
 

  1. Problem opening map file   Reply  
Picture of Rene Fouquet
Rene Fouquet
2005-01-28 11:01:13
Hi,

I'm trying to convert text from UTF8 to ISO-8859-1, but I get an error message: "ERR_OPEN_MAP_FILE : Error openning file: ISO88591.MAP"

I'm using this code:

$utfConverter = new utf8(ISO88591);
$utfConverter->loadCharset("ISO88591");

and I'm using this map file:
http://www.amidasu.de/ISO88591.MAP

In utf8.class.php I use this code:

define("ISO88591", "ISO88591.MAP");

How do I get rid of the error? It should work, shouldn't it? :)

Thanks for any help,
René

  2. Re: Problem opening map file   Reply  
Picture of Alexandar Minkovsky
Alexandar Minkovsky
2005-01-30 20:31:34 - In reply to message 1 from Rene Fouquet
Hi,

This line:
define("ISO88591", "ISO88591.MAP");
will work only if the PHP file that loads the class is located in the same directory as the MAP file.
In the original class file it is done like this:
define("MAP_DIR",".");
define("CP1250",MAP_DIR . "/CP1250.MAP");

The MAP_DIR constant always points to the directory where MAP files are located.

Hope this helps,

Alex