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

:a hint for single ASCII chars? #660

Open
allexoll opened this issue Feb 11, 2022 · 1 comment
Open

:a hint for single ASCII chars? #660

allexoll opened this issue Feb 11, 2022 · 1 comment
Assignees
Labels
difficulty: medium Somewhat difficult to solve status: needs PR Issue just needs a Pull Request implementing the changes type: enhancement Enhancement or feature request

Comments

@allexoll
Copy link

I ran into a surprise using the :a hint when using it with single characters, they print as decimal:

let v:u8 = 97; // 'a'
let bytes = [104, 101, 255, 108, 108, 111];
defmt::info!("{=[u8]:a}", bytes); // -> INFO b"he\xffllo"
defmt::info!("{=u8:a}", v); // -> INFO 97

Is that the expected behaviour? This can easily fixed on my end by doing [v] but i was surprised none the less

feel free to close this if it is expected behaviour

@Urhengulas
Copy link
Member

Hi @allexoll, Thank you for opening this conversation.

There is nothing which speaks against the :a display hint supporting chars as well. It was just not asked for so far.

Would you be interested in implementing it? We can guide you through it.

Have a great day! 🌥️

@Urhengulas Urhengulas added difficulty: medium Somewhat difficult to solve status: needs PR Issue just needs a Pull Request implementing the changes type: enhancement Enhancement or feature request labels Feb 15, 2022
@Dajamante Dajamante self-assigned this Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium Somewhat difficult to solve status: needs PR Issue just needs a Pull Request implementing the changes type: enhancement Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

3 participants