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

StyledTextCtrl. SetText and emoji #2472

Closed
Jenyay opened this issue Nov 3, 2023 · 3 comments
Closed

StyledTextCtrl. SetText and emoji #2472

Jenyay opened this issue Nov 3, 2023 · 3 comments

Comments

@Jenyay
Copy link
Contributor

Jenyay commented Nov 3, 2023

Operating system: Windows 10 (everything is fine on Linux)
wxPython version & source: 4.2.1
Python version & source: Python 3.8

Description of the problem: If there are some emoji (📌, 💡, 💾) in the text, inserting the text using SetText() will trim the last character.

import wx
import wx.stc

class TestFrame(wx.Frame):
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(400, 300))
        self.text = wx.stc.StyledTextCtrl(self)
        self.text.SetText("📌 111 222 333")

if __name__ == '__main__':
    app = wx.App()
    frame = TestFrame(None, 'StyledTextCtrl Test')
    frame.Show()
    app.MainLoop()

Result:
StyledTextCtrl Test

@reticulatus
Copy link
Contributor

It's probably related to the following issue: #2446

@swt2c
Copy link
Collaborator

swt2c commented Nov 3, 2023

Yes, I think it's a duplicate of #2446.

@swt2c swt2c closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
@Metallicow
Copy link
Contributor

Umm yeah I think you nailed the issue.

... but always remember all Llama emoji are at LEAST 2 chars long haha...

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

No branches or pull requests

4 participants