core:text fix unicode handelingin `shorten` routine. closes #1274