Hi,

Im making a database converter (phpbb to ipb)
I noticed during analysing both databases that the posts of phpbb are converted to bytes

as you can c here
Code:
-- Table structure for phpbb_posts
-- ----------------------------
CREATE TABLE `phpbb_posts` (
  `post_id` mediumint(8) unsigned NOT NULL auto_increment,
  `topic_id` mediumint(8) unsigned NOT NULL default '0',
  `forum_id` mediumint(8) unsigned NOT NULL default '0',
  `poster_id` mediumint(8) unsigned NOT NULL default '0',
  `icon_id` mediumint(8) unsigned NOT NULL default '0',
  `poster_ip` varchar(40) collate utf8_bin NOT NULL default '',
  `post_time` int(11) unsigned NOT NULL default '0',
  `post_approved` tinyint(1) unsigned NOT NULL default '1',
  `post_reported` tinyint(1) unsigned NOT NULL default '0',
  `enable_bbcode` tinyint(1) unsigned NOT NULL default '1',
  `enable_smilies` tinyint(1) unsigned NOT NULL default '1',
  `enable_magic_url` tinyint(1) unsigned NOT NULL default '1',
  `enable_sig` tinyint(1) unsigned NOT NULL default '1',
  `post_username` varchar(255) collate utf8_bin NOT NULL default '',
  `post_subject` varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL default '',
  `post_text` mediumtext collate utf8_bin NOT NULL,
  `post_checksum` varchar(32) collate utf8_bin NOT NULL default '',
  `post_attachment` tinyint(1) unsigned NOT NULL default '0',
  `bbcode_bitfield` varchar(255) collate utf8_bin NOT NULL default '',
  `bbcode_uid` varchar(8) collate utf8_bin NOT NULL default '',
  `post_postcount` tinyint(1) unsigned NOT NULL default '1',
  `post_edit_time` int(11) unsigned NOT NULL default '0',
  `post_edit_reason` varchar(255) collate utf8_bin NOT NULL default '',
  `post_edit_user` mediumint(8) unsigned NOT NULL default '0',
  `post_edit_count` smallint(4) unsigned NOT NULL default '0',
  `post_edit_locked` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`post_id`),
  KEY `forum_id` (`forum_id`),
  KEY `topic_id` (`topic_id`),
  KEY `poster_ip` (`poster_ip`),
  KEY `poster_id` (`poster_id`),
  KEY `post_approved` (`post_approved`),
  KEY `tid_post_time` (`topic_id`,`post_time`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records 
-- ----------------------------
INSERT INTO `phpbb_posts` VALUES ('1', '1', '2', '2', '0', '127.0.0.1', '1247936276', '1', '0', '1', '1', '1', '1', '', 'Welcome to phpBB3', 
0x5468697320697320616E206578616D706C6520706F737420696E20796F75722070687042423320696E7374616C6C6174696F6E2E2045766572797468696E67207365656D7320746F20626520776F726B696E672E20596F75206D61792064656C657465207468697320706F737420696620796F75206C696B6520616E6420636F6E74696E756520746F2073657420757020796F757220626F6172642E20447572696E672074686520696E7374616C6C6174696F6E2070726F6365737320796F75722066697273742063617465676F727920616E6420796F757220666972737420666F72756D206172652061737369676E656420616E20617070726F70726961746520736574206F66207065726D697373696F6E7320666F722074686520707265646566696E6564207573657267726F7570732061646D696E6973747261746F72732C20626F74732C20676C6F62616C206D6F64657261746F72732C206775657374732C207265676973746572656420757365727320616E64207265676973746572656420434F5050412075736572732E20496620796F7520616C736F2063686F6F736520746F2064656C65746520796F75722066697273742063617465676F727920616E6420796F757220666972737420666F72756D2C20646F206E6F7420666F7267657420746F2061737369676E207065726D697373696F6E7320666F7220616C6C207468657365207573657267726F75707320666F7220616C6C206E65772063617465676F7269657320616E6420666F72756D7320796F75206372656174652E204974206973207265636F6D6D656E64656420746F2072656E616D6520796F75722066697273742063617465676F727920616E6420796F757220666972737420666F72756D20616E6420636F7079207065726D697373696F6E732066726F6D207468657365207768696C65206372656174696E67206E65772063617465676F7269657320616E6420666F72756D732E20486176652066756E21,
 '5dd683b17f641daf84c040bfefc58ce9', '0', '', '', '1', '0', '', '0', '0', '0');
INSERT INTO `phpbb_posts` VALUES ('2', '1', '2', '2', '0', '127.0.0.1', '1248013556', '1', '0', '1', '1', '1', '1', '', 'Re: Welcome to phpBB3', 0x496D2061207370616D7A6F72, '70f9aa741b6128418d7fc20b0617b94b', '0', '', '3ffof7xe', '1', '0', '', '0', '0', '0');
I want to convert those to regular text again
but I have no clue how to script my converter to lookup the bytes place (after 0x) converts the string (as the bytes arent in array) and where to stop converting the bytes (after the ,)
then replace the bytes text by the regular text

and this needs to be in a loop because all posts need to be converted to normal text

I hope someone can help me with this issue

Regards