I started with 111 (didn't realize the last byte added by sprintf at the time) and it works fine, primarily because the longest item name in the DB is 50 characters long:
Code:
mysql> SELECT id, Name, CHAR_LENGTH(Name) as Name_length FROM items ORDER BY Name_length DESC, id ASC LIMIT 5;
+-------+----------------------------------------------------+-------------+
| id | Name | Name_length |
+-------+----------------------------------------------------+-------------+
| 18557 | Prophecy of Vah: A History of the Vah Shir Vol.III | 50 |
| 20429 | Banner Material Kit: Focus of Benefit Conservation | 50 |
| 18556 | Prophecy of Vah: A History of the Vah Shir Vol.II | 49 |
| 46814 | Gnomework Model XVII's Experimental Plate Backing | 49 |
| 57937 | First Sisters of the Blackfeather Harpies Vol. II | 49 |
+-------+----------------------------------------------------+-------------+
5 rows in set (0.98 sec)
I'll get this updated into SVN once I have a chance to finish some other stuff (unless someone wants to take care of it first).