That is a core Mendix functionality. I can only imagine a workaround:
Not elegant but maybe faster than letting Mendix change the conversion logic.
EDIT 1: In case of database replication, you will have to dive into the Java Actions of that module. It will contain a trim somewhere.