WordPress import error: "Could not select entry informa

Found a bug? Tell us!!
pmjdebruijn
Regular
Posts: 14
Joined: Sun Dec 30, 2007 3:16 pm
Location: Netherlands
Contact:

Post by pmjdebruijn »

In import.inc.php

function &decode($string) {
$target = $this->data['charset'];
$out = iconv('ISO-8859-1', 'UTF-8', $string);
$good = iconv('UTF-8', 'UTF-8//IGNORE', $out);
return $good;

}

Even this doesn't seem to help.

I'm not familiar enough with the Serendipity codebase to find out what is going wrong. But somehow some invalid characters are still reaching PostgreSQL.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, when using MySQL, this works for me...so I do believe there must be a postgresql client or server library issue...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
pmjdebruijn
Regular
Posts: 14
Joined: Sun Dec 30, 2007 3:16 pm
Location: Netherlands
Contact:

Post by pmjdebruijn »

No.

PostgreSQL just stricktly adheres to UTF8. As it should!

Somehow, invalid characters are arriving at the PostgreSQL database.

Most likely the invalid characters are in my original MySQL database, and s9y is failing to take them out before storing the data in my PostgreSQL database.
pmjdebruijn
Regular
Posts: 14
Joined: Sun Dec 30, 2007 3:16 pm
Location: Netherlands
Contact:

Post by pmjdebruijn »

I noticed the decode function isn't used by the wordpress.inc.php file.

Where should I call it, to cleanup the contents of some posts.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Actually, it is used. Check for $this->decode(), it is applied to the title there for example.

Also, the $this->strtr() function decodes all strings, this is declared in the global Importer class in include/admin/importers.inc.php.

I wish I could be more of help, but I don't really know how pgsql operates in these cases and where to check for errors/problems with char coding. MySQL does all that for me ;)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply