Import["file", "String"] imports a file as a raw string, representing each byte of the file as the character corresponding to FromCharacterCode[byte].
Export["file", str, "String"] exports a Mathematica string of characters to a binary file. Characters with an encoding greater than 255 are converted to their ASCII representation before exporting.