Fastest way to strip invalid characters from stream
A method to convert certain non-readable ASCII characters in a
Comments
Can you provide the code you are using currently so we have something definitive to base comments off, but have you tried using $translate and reading the data in big chunks e.g. 16k at a time?
While 'binarystream.AtEnd {
Set sc=outputstream.Write($translate(binarystream.Read(16000),badchars,goodchars)
}Where binarystream is your binary input stream, outputstream is your output stream with the converted characters and badchars is a list of the bad characters you need to convert and goodchars is the list of the values you want the badchars converted into.
Or you can use $zconvert instead of $translate. It is more useable in some cases.