in reply to Unicode Problems with DBI?

Okay, I found the solution to anyone interested:

chromatic was right, it was the chop. from perlunicode:

Most operators that deal with positions or lengths in the string will automatically switch to using character positions, including chop(), substr(), pos(), index(), rindex(), sprintf(), write(), and length().

Which means that chop automaticaly switches to wide charachters and translates the whole deal to unicode.

The solution was to put a use bytes at the beginning of the sub insertstr (which caused all the problem).