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

Pasting Unicode text sometimes doesn't work on Windows #11300

Closed
entuland opened this issue May 30, 2021 · 4 comments
Closed

Pasting Unicode text sometimes doesn't work on Windows #11300

entuland opened this issue May 30, 2021 · 4 comments
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible Windows

Comments

@entuland
Copy link

entuland commented May 30, 2021

Minetest version 5.4.1, seeing a few oddities trying to deal with UTF-8 characters.

I set all the game fonts (from the settings) to use Unifont and the fallback one to use Unifont Upper, for starters.

Printing Greek or Russian characters in the chat via a mod works, but trying to type such chars directly in the chat, just like pasting such text, results in question marks.

Same behavior (question marks) trying to type Greek characters in a textbox.

(By the way, I enter such Greek characters via a AutoHotKey script, which seems to work fine everywhere else - just like here, typing some random gibberish: καjηδφκασhδφκθασδφ)

Typing Italian accented vowels in a textbox they show up correctly, but as I copy them from the same textbox and I paste it back it comes up garbled. (my real keyboard has the Italian layout)

Attaching a few screenshots showing the behavior (where I tried to print Russian characters I also appended a Unicode smiley, which the chat didn't print out)

Mod-printed Russian chars, the mod printed these chars + a Unicode Smiley (this one: 😀) but the chat didn't print it out:
2021-05-31 00_48_08-Window

Mod-printed Greek chars + Greek chars typed in the chat (showing up as question marks:)
2021-05-31 01_03_42-Window

Italian accented letters entered properly with my Italian keyboard:
2021-05-31 00_43_48-Window

Result of copypasting the above Italian accented letters:
2021-05-31 00_44_03-Window

Edit: adding the AutoHotKey script I use to enter Greek chars with CapsLock on:
Unicode.ahk.txt

@entuland entuland added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label May 30, 2021
@entuland
Copy link
Author

Downloaded the latest 5.5.0-dev windows 64 build and reproed the above, here are the results:

For starters, set all the fonts to use Unifont and the Upper variant as fallback:

2021-05-31 10_28_16-Window

Copypasting Italian accented letters in a textbox works, but typing or pasting greek or cyrillic still fails with question marks:

2021-05-31 10_32_00-Window

2021-05-31 10_50_11-Window

Printing greek or cyrillic via a mod works, printing smileys still fails (the last line should have been smileys: 😀 🤪 😠)

In the following I pasted in the chat prompt all of this text at once: οψρψρξεyωρψ вротмввсмшнкыардж 😀 🤪 😠:

2021-05-31 10_45_19-Window

minetest.register_chatcommand("utf8test", {
	description = "utf8 test description",
	func = function()
		minetest.chat_send_all("greek: οψρψρξεyωρψ")
		minetest.chat_send_all("cyrillic: вротмввсмшнкыардж")
		minetest.chat_send_all("smileys: 😀 🤪 😠")
	end
})

@sfan5
Copy link
Member

sfan5 commented May 31, 2021

There's two different things here:

  • Unicode pasting being broken: this would be responsibility of IrrlichtMt
  • Emojis not appearing: Emojis will render (albeit monochrome, color is not supported) if the specified font supports them

@entuland
Copy link
Author

Also directly entering some of those Unicode chars seems to be broken, so the issues may be three in total - at least, I assume that if my AutoHotKey script is working properly anywhere else, it should be sending the correct chars to Minetest as well, and as such it would be different from pasting.

Should I close / edit this issue and create new ones to split them all?

@sfan5 sfan5 added the Windows label May 31, 2021
@sfan5 sfan5 changed the title UTF-8 oddities typing in the chat and in textboxes Pasting Unicode text sometimes doesn't work on Windows Jun 1, 2021
@sfan5
Copy link
Member

sfan5 commented Aug 30, 2021

works for me or fixed by minetest/irrlicht@34f1f8d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible Windows
Projects
None yet
Development

No branches or pull requests

2 participants