Since the SQL query box of an SSIS Lookup transformation is almost unusable, I usually write my code in SSMS (formatted with Redgate's SQL Prompt tool) and copy it to the Lookup.
When you close this window and later come back in, sometimes the formatting is preserved, but sometimes the carriage returns are replaced by the "square" character, as if the editor doesn't know how to display a carriage return, making the SQL unreadable. Copying it back into SSMS renders it perfectly readable again, and copying it back to the Lookup usually restores the formatting.
Any idea why the SQL box sometimes can't display the carriage returns properly? Is there any way to fix it, or is it just an annoyance you have to live with in SSIS?