Skip to content

Custom string types display non-ASCII characters as escaped UTF bytes #8358

Description

@mon

Version and Platform (required):

  • Binary Ninja Version: 5.4.10175-dev (e5c7b8a9)
  • Edition: Personal
  • OS: Windows
  • OS Version: 11
  • CPU Architecture: x64

Bug Description:
Custom strings appear to only display ASCII characters. For example, the custom string "Unicode: こんにちは" displays as "Unicode: \xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf.
The example string uses Hiragana characters, I have also enabled these in analysis.unicode.blocks in case it was important.

Steps To Reproduce:

  1. Install the test plugin: test_string.py
  2. Load any binary with a custom string you wish to apply.
  3. Define a custom type, typedef char __attr("custom")* cs;
  4. Give that type to the function argument

Expected Behavior:
The string is displayed in HLIL as "Unicode: こんにちは".

Screenshots/Video Recording:
Image

Binary:
Here is a tiny binary that calls a function with some data: a.zip

Additional Information:
n/a

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