If you're SELECT INTO OUTFILE or something of the like, you're obviously going to run into problems with escaping. If you want to avoid all the hassle, just backup the actual files (although "some" people would call me stupid for telling people to do so):
If you have RedHat 7 or something like that, then just tar your /var/lib/mysql folder, and you have a full backup of ALL your database files. To restore it, just copy a folder, or all the table files, and you're done. Much easier than SELECT'ing or dumping, and much safer and precise, I might add. Of course, you have to have root access... That's the down side of things.