Conversation
In RHEL 10 (and other modern systemd-based distributions), the hostnamectl command has been updated to include visual icons using UTF-8 characters for the Chassis field. This change is part of the upstream systemd project's effort to make the CLI output more visually informative for users. Instead of just seeing the word "laptop" or "server," you now see a corresponding symbol. This leads to following: ``` warning: JSON.generate: UTF-8 string passed as BINARY, this will raise an encoding error in json 3.0 ``` Signed-off-by: Joseph J Nuspl Jr <nuspl@nvwls.com>
jaymzh
requested changes
Dec 27, 2025
Contributor
Author
|
That regex works except for the tablet emoji which is CJK https://github.com/systemd/systemd/blob/main/src/hostname/hostnamectl.c#L82 I'll add a |
Add unit tests. Signed-off-by: Joseph J Nuspl Jr <nuspl@nvwls.com>
Contributor
Author
|
@jaymzh Please review the updated changes. |
jaymzh
reviewed
Jan 19, 2026
Collaborator
|
ping @nvwls |
Signed-off-by: Joseph J Nuspl Jr <nuspl@nvwls.com>
|
jaymzh
approved these changes
Jan 28, 2026
Collaborator
jaymzh
left a comment
There was a problem hiding this comment.
This looks great, thanks.
I will say, I think we should extend the tests to have the emoji tested in places other than just the end of the line, but since that's where they are today, I'm not gonna block on that.
I've requested the tests unblocked, and then we'll merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
In RHEL 10 (and other modern systemd-based distributions), the hostnamectl command has been updated to include visual icons using UTF-8 characters for the Chassis field.
This change is part of the upstream systemd project's effort to make the CLI output more visually informative for users. Instead of just seeing the word "laptop" or "server," you now see a corresponding symbol.
This leads to following:
Related Issue
#1908
Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.