UTF-friendly trims for trimming of autogenerated content when they exceed a user specified size