s3_truncate: convert to unicode before truncating (otherwise it could split multibyte characters and cause unicode decoding errors)