Wrong line-drawing characters when write "tree" command output to file
Use either of these to get compatible characters. 

tree --charset=ascii &gt; a.txt
tree --charset unicode &gt; a.txt


https://unix.stackexchange.com/questions/127063/tree-command-output-with-pure-7-bit-ascii-output