--- In [email protected], "swzoh" <sean...@...> wrote: > > --- In [email protected], "Sheri" <sherip99@> wrote: > > > > I think at a minimum it would be necessary to replace or remove the former > > trail byte if it is a decimal value greater than 127 or if it is a > > character not otherwise allowed in file names. > > > > What if that happens to be a lead byte? Well, I know what you meant, actually > there is no unambiguous solution here. Logically, however, the fact that > mblen is -1 doesn't imply anything about the second byte, it only tell that > the first byte cannot possibly be legal. >
I don't want to overcomplicate things. It only checks after finding a lead byte, and if the combination of that lead byte and next byte is not valid dbcs pair, then it replaces both by a blank.
