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

Labels

State: Awaiting TriageIssue is waiting for more in-depth triage from a developer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions