CycleTLS icon indicating copy to clipboard operation
CycleTLS copied to clipboard

Problem when sending binary data

Open liteCarma opened this issue 1 year ago • 2 comments

Description

For buffer serialization you use utf8 (Buffer.concat(chunks).toString('utf8') ), the problem is that if encoding is 'utf8' and a byte sequence in the input is not valid UTF-8, then each invalid byte is replaced with the replacement character U+FFFD. Could you use Buffer.concat(chunks).toString('base64 ') instead?

Issue Type

Bug

Operating System

Windows 10

Node Version

Other

Golang Version

Other

Relevant Log Output

No response

liteCarma avatar Dec 07 '23 11:12 liteCarma

Same issue, can not decode gbk correctly

fyxtc avatar Dec 11 '23 08:12 fyxtc

Will likely do a version bump that will support just streaming the binary data directly as the decoding has been causing issues for a while now.

Danny-Dasilva avatar Jan 08 '24 17:01 Danny-Dasilva