Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I read a UTF-8 character? #45

Open
chandlerkent opened this issue Jun 1, 2015 · 1 comment
Open

How do I read a UTF-8 character? #45

chandlerkent opened this issue Jun 1, 2015 · 1 comment

Comments

@chandlerkent
Copy link

I have binary data that looks like the following:

Originally, my typeSet looked like this:

var typeSet = {
    'jBinary.all': 'BBoxes',
    'jBinary.littleEndian': true,

    BBox: {
        character: ['char'],
        x0: ['float32'],
        y0: ['float32'],
        x1: ['float32'],
        y1: ['float32'],
        x2: ['float32'],
        y2: ['float32']
    },

    BBoxes: ['array', 'BBox']
};

This works beautifully for the majority of my data. However, some of the characters are not a single byte (for example, the copyright symbol).

Is there a supported way to read a UTF-8 character, consuming as many bytes as needed to read that character?

@RReverser
Copy link
Member

Unfortunately, no, reading dynamic character size is not currently supported. PR would be very welcome though!

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

No branches or pull requests

2 participants