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

AssertionError: Title length must be less than 256 characters (Icon Banner) #653

Open
sentry-io bot opened this issue Oct 27, 2023 · 3 comments
Open

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 27, 2023

Sentry Issue: SKYTEMPLE-1VY

AssertionError: Title length must be less than 256 characters
  File "core\rom_project.py", line 420, in _save_impl
  File "skytemple_files\hardcoded\icon_banner.py", line 131, in save_to_rom
  File "skytemple_files\hardcoded\icon_banner.py", line 33, in _utf16_encode_fixed
@theCapypara theCapypara added this to To do in Core: All open issues via automation Oct 27, 2023
@theCapypara
Copy link
Member

This is a bit tricky, the encoding happens at save currently.

Since it's UTF-16 we should probably limit the max number of character to 128 in the text view, but there's no easy built-in way to do this.

Also @tech-ticks since you wrote this error: If it's UTF-16 isn't the error message actually wrong, shouldn't it say 128 characters?

@tech-ticks
Copy link
Contributor

Yeah, it should say 256 bytes instead of characters. Since a UTF-16 character is either 2 or 4 bytes, limiting the number of characters to 128 isn't correct either, technically.

@theCapypara
Copy link
Member

Oh right, forgot about 4 byte characters. Well it's probably good enough for practical purposes.

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

No branches or pull requests

2 participants