Skip to content

Little tip for body encoding #28

@kjs104901

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.

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