Skip to content

XML string handling is broken #9

Closed
@aduskett

Description

@aduskett

The title is a bit vague, so please let me explain:

Currently, there are two significant issues with how string handling is done:

  1. When processing a .od file, strings are not processed as byte arrays, which causes the size of arrays in generated c files to be much larger than intended. Take, for example, the following string: /X00/X00/X00. The old canfestival based on Python 2 creates an array of size three because it has three null characters, and Python2 treats strings as byte arrays. The current code treats the above as “/X00/X00/X00” which generates an array of size 12 because Python 3 treats all strings as UTF8!

  2. In the old canfestival GUI, strings were converted to base 10. IE: 0XFF is converted to decimal (255) for the GUI, then converted back to hex for the .OD file. The current GUI does not convert the base 16 numbers to base 10 for the GUI, which seems like a significant regression.

Any help? The XML parser had a lot of warnings and odd-looking code when I loaded it up into PyCharm.

Thanks!
Adam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions