Without more detail about how you "read attachments" specific help is difficult to offer.
You might be encountering a Unicode BOM prefix, perhaps there are characters from the disallowed subset for file names, or you may be dealing with control characters or more likely characters with AscW() values > 127 such as foreign alphabet symbols and such.
You can create files with "Unicode file names" via API calls, but it may be simpler to translate such symbols to some sort of "splat" like # or _ which should work without incident. If necessary you could just iterate over the file name string character by character using AscW(char) and a Select Case statement to identify "bad" characters and replace them.