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

Bug: Unicode support #533

Open
Mee42 opened this issue Jan 22, 2021 · 2 comments
Open

Bug: Unicode support #533

Mee42 opened this issue Jan 22, 2021 · 2 comments

Comments

@Mee42
Copy link

Mee42 commented Jan 22, 2021

I'm trying to use a middle dot character (U+00B7) in my TerminalScreen. My terminal supports the character, echo · works.

This also works:

new PrintStream(System.out, true, Charsets.UTF_8).println('\u00B7')

Yet, none of the lanterna apis seem to support it. I've tried the putCharacter/putString on Terminal and for TerminalScreen

TextCharacter.fromCharacter('·')[0]

It renders as a ?. When I force lenterna to open a gui window, it actually renders the dot properly. My guess is that there's a check to see if the output terminal supports unicode, and there's a bug that it returns "unsupported" for my terminal emulator, terminator.

Thanks for your help :)

@avl42
Copy link
Contributor

avl42 commented Jan 22, 2021 via email

@mabe02
Copy link
Owner

mabe02 commented Apr 11, 2021

@Mee42 can you try this with 3.1.1?

        Terminal terminal = new TestTerminalFactory(args).createTerminal();
        Screen screen = new TerminalScreen(terminal);
        screen.startScreen();
        screen.newTextGraphics().putString(4, 2, "Hello!");
        screen.setCharacter(4, 2, TextCharacter.fromString("·")[0]);
        screen.refresh();
        Thread.sleep(5000);
        screen.stopScreen();

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

3 participants