Skip to content

Little tip for body encoding #28

Description

@kjs104901

In the source code, it forces data to be decoded under ascii.
data = data.toString("ascii");

When you wanna decode under other charset for Asian language etc.,
you have to make a buffer accumulating incoming data

bufferedBuffer = Buffer.concat([bufferedBuffer, data]);

And callback it.

callback(responseCopy, bufferedDataCopy, bufferedBufferCopy);

Now you can access low level buffer in your code.

popClient.on("retr", function(status, msgnumber, data, rawdata, buffer) {} );
self.setCallback(function(resp,` data, buffer) {
self.emit("retr", resp, msgnumber, returnValue, data, buffer);

You can use iconv to decode it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions