PDA

View Full Version : Swedish characters in catdoc


DeSoto
11-14-2006, 03:40 AM
Hi!
I'm about to develop a site that has a search engine, and I've been looking at PhpDig, and it seems really nice! I saw that it used catdoc to get text from MS Word-files, so I started testing with it, but it doesn't seem to work.

The two lines:
define('PHPDIG_PARSE_MSWORD','W:\www\catdoc\catdoc.exe');
define('PHPDIG_OPTION_MSWORD','-s 8859-1');

are in my config.php, but some characters are not translated correctly. If I test it with a Word-file i created, "ä" becomes "d", "ö" becomes "tz" and "å" becomes "e", and in rtf-files, it becomes other wierd characters. I've spent the last hours googling on it, but I can't make it work. Am I missing something? I've read about character substitution in catdoc, but I really don't know how I would do it.

All help is appreciated!

DeSoto
11-16-2006, 01:21 AM
Ah! Stupid me, you just edit the charsets/ascii.rpl file, so that "ö" gets replaced with something unique, that you can replace before you insert it into the database.

JohanLM
11-21-2006, 05:47 AM
Can you explain that in Sweidhs... erhm... English...
Just tell me what you did. :p

How do I replace it with something "unique"?