Skip to content

Wrong conversion between slow and fast buffer #11

@efolio

Description

@efolio

Problem description:
Create a database with a single binary column, put an image in it. Create a query for this cell, put the resulting buffer in a file and try to open it. The file is pretty much always corrupted.

Reason:
I found this is due to the fact that the data is converted to a String type before the buffer creation. Though this is the quickest way to create a Buffer from a char*, this also implies an utf-8 conversion that scrambles the content of the buffer.

I have a proposed patch for this I'll attach right away.

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