Thanks for your interest to my case.
I've try your solution, and here is the result:
for name in $( cat file.txt ); do
Give me this
At each n
the script met, it take it as the end of the variable.
Note: If that can help, i'm using a bash script (#!/bin/bash)
Here is the version: GNU bash, version 3.1.17(1)-release