[BUG] Mac addresses print emojis
See original GitHub issueDescribe the bug
A MAC address like 01:23:45:CD:89:AB
is printed as 01:23:45๐ฟ89:AB
from rich import print
print("Address: 01:23:45:CD:89:AB")
I checked if it is possible to change the default highlighter to render the string without emojis but didnโt find a way to do this.
I know I could suppress emojis at all e.g. with Console(emoji=false)
but I would like to suppress it only for those specific strings.
Is it possible to add an option to Style
to not render emojis or is there a better way?
Platform
Click to expand
What platform (Win/Linux/Mac) are you running on? What terminal software are you using? Ubuntu 21.10 with standard Gnome Terminal.
โโโโโโโโโโโโโโโโโโโโโโโโโ <class 'rich.console.Console'> โโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ A high level console interface. โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ <console width=243 ColorSystem.TRUECOLOR> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ color_system = 'truecolor' โ
โ encoding = 'utf-8' โ
โ file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> โ
โ height = 86 โ
โ is_alt_screen = False โ
โ is_dumb_terminal = False โ
โ is_interactive = True โ
โ is_jupyter = False โ
โ is_terminal = True โ
โ legacy_windows = False โ
โ no_color = False โ
โ options = ConsoleOptions( โ
โ size=ConsoleDimensions(width=243, height=86), โ
โ legacy_windows=False, โ
โ min_width=1, โ
โ max_width=243, โ
โ is_terminal=True, โ
โ encoding='utf-8', โ
โ max_height=86, โ
โ justify=None, โ
โ overflow=None, โ
โ no_wrap=False, โ
โ highlight=None, โ
โ markup=None, โ
โ height=None โ
โ ) โ
โ quiet = False โ
โ record = False โ
โ safe_box = True โ
โ size = ConsoleDimensions(width=243, height=86) โ
โ soft_wrap = False โ
โ stderr = False โ
โ style = None โ
โ tab_size = 8 โ
โ width = 243 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโ <class 'rich._windows.WindowsConsoleFeatures'> โโโโโฎ
โ Windows features available. โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ WindowsConsoleFeatures(vt=False, truecolor=False) โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ truecolor = False โ
โ vt = False โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Environment Variables โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ {'TERM': 'xterm-256color', 'COLORTERM': 'truecolor', 'CLICOLOR': None, 'NO_COLOR': None, 'TERM_PROGRAM': None, 'COLUMNS': None, 'LINES': None, 'JPY_PARENT_PID': None, 'VSCODE_VERBOSE_LOGGING': None} โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
platform="Linux"
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Use emoji and symbols on Mac - Apple Support
Use emoji and symbols on Mac. Use the Character Viewer to enter emoji, symbols, accented letters, and characters from other languages into your...
Read more >How to Add Emoji to eMail Messages in Mac OS the Fast Way
How to Add Emoji to Emails on the Mac Quickly ยท Open Mail on the Mac ยท From any Mail compose window (new...
Read more >Full Emoji List, v15.0 - Unicode
โ Code Browser CLDR Short Name
1 U+1F600 ๐ grinning face
2 U+1F603 ๐ grinning face with big eyes
3 U+1F604 ๐ grinning face with smiling...
Read more >How to use emoji on your Mac | iMore
Hold down the following three keys at the same time: Command+Control+Spacebar. This will bring up the emoji picker. Click the emoji you'd likeย ......
Read more >How to type Emojis and Symbols on a Mac
Want to type emojis on your Mac? Of course you do. Here's how you can pick emojis from a big palette of choices....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Styles are unrelated to emoji.
Iโm assuming you want some emojis in logging and disable emoji codes for others. If thatโs the case, I would disable emoji codes and simply paste the emojis you want in the log strings.
However, this has me thinking that emoji codes in logging is a bad idea, because only the Rich handler can render them. I think I should disable emoji in logging by default.
Did I solve your problem?
Why not buy the devs a coffee to say thanks?