This is an attempt to find out how is the read utility working in several shells. Found a difference that seems like a bug to me.
Results are that dash retains trailing spaces with read:
dash: <a b >
bash: <a b>
In short: Why this code perform differently in bash and dash read?
dash -c 'echo " a b " | { read var; echo "<$var>"; }'
bash -c 'echo " a b " | { read var; echo "<$var>"; }'