View Single Post
Old 02-24-2012, 11:06 PM   #446
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,261
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by wallcraft
The Mobi2Mobi GUI can be used to change 501 to EBOK, but under Windows 7 it has a bug that truncates the printout from mobi2mobi - which often means that you can't see the current value of cdetype (exth 501). So the edit works, but I had to check it using the command line mobi2mobi (and the command line can also edit the exth value directly).
Actually, I think this bug affects most, if not all, versions of Windows.

The problem is because of null characters (chr(0), \0... etc) that are present in the data stored in the various EXTH entries. Textboxes in Visual Basic are unable to display these null characters so as soon as one is encountered... it barfs and everything that comes after gets truncated.

Easily fixable by replacing the null characters in the string that gets written to the textbox. Taking a look at the source, I was able to get it to work properly by modifying the string that gets returned by the BatchProcess function.

Instead of:
PHP Code:
Return res 
I changed it to:
PHP Code:
Return res.Replace(Chr(0), ""
The text box now displays the entire output of mobi2mobi.
DiapDealer is online now   Reply With Quote