I am OK initially with an error if trim_char is longer than one CHARACTER (not byte!).
Then these boost calls would work, but there may be a more efficient boost method that operates on a single (UTF8) character string.