PHP Classes

Problem opening map file

Recommend this page to a friend!

      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
Author:Rene Fouquet
Date:2005-01-28 11:01:13
Update:2005-01-30 20:31:34

  1. Problem opening map file   Reply   Report abuse  
Rene Fouquet - 2005-01-28 11:01:13

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);

and I'm using this map file:

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,

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

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("CP1250",MAP_DIR . "/CP1250.MAP");

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

Hope this helps,