[CSM] Unicode Parser [unicodeparser]

User avatar
muhdnurhidayat
Member
 
Posts: 295
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

[CSM] Unicode Parser [unicodeparser]

by muhdnurhidayat » Mon Apr 23, 2018 07:35

Unicode Parser


Unicode Parser (unicodeparser) is a CSM that displays a window for you to write unicode codepoint escapes then it will convert to real text string of that codepoints and send it out on public chat. To show the window, send .ug

The tool to convert text into unicode codepoint escapes is included, it is written in Python2 (for now).

This CSM was created so that I could chat in Chinese and Japanese which uses Input Method Editors (IME) in game but the Windows version of Minetest could never accepts IME into its chat. This is kind of workaround to bypass system limitation.

License: MIT
Depends: None

GitHub | Download | Open bug report

Image

To Do
- Include translation support (which seems to be impossible right now because CSM can't access other files)

+ GIF in action
Last edited by muhdnurhidayat on Wed Jul 11, 2018 13:54, edited 1 time in total.
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

User avatar
muhdnurhidayat
Member
 
Posts: 295
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [CSM] Unicode Parser [unicodeparser]

by muhdnurhidayat » Wed Jul 11, 2018 13:53

I've updated the csm.

Apparently some of the OS that would paste out unicode escape in Minetest uses a different format, \uXXXX instead of \0xXXXX. The new update ensure compatibility with those OS.

Additionally, I've added the command line option as well, so those who prefer to just paste can now do .uc followed by the text, no need to do .ug to open the GUI, but those who prefer to open GUI can still use it as usual.

Here's the new .uc in action, I use the \uXXXX format in the GIF but both format works.
Image
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

User avatar
muhdnurhidayat
Member
 
Posts: 295
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [CSM] Unicode Parser [unicodeparser]

by muhdnurhidayat » Fri Jul 20, 2018 19:07

I've updated the CSM.
New release here: https://github.com/MuhdNurHidayat/unico ... s/tag/v1.2

What's new:
  • The tool now convert the codepoint when you press enter after writing the text, so you don't need to click the button "Convert" anymore, but the button is still there for compatibility reasons.
  • The tool now copies the converted codepoint to your clipboard when ypu enter or press the "Convert" button, so you don't need to manually copy (Ctrl-C) anymore.
  • Added link to GitHub at the tool.
  • The tools now have icon, which is modified from Minetest icon.
  • Added Windows executable for the tool so that those who don't have Python2 would not need to install it just to use the tool.
  • Additional thanks to the following people who either tested the Windows executable file or given some advice to me:
    • Heathcliff#0001 ( Anime Trending Discord server)
    • Fidoze#7037 ( Anime Trending Discord server)
    • Aqo#5414 ( A.I. Channel Unofficial Discord server)
    • xnamkcor#3740 ( A.I. Channel Unofficial Discord server)
(Note: I purposely ask people not from Minetest community to test the executable because I don't want biased feedback.)

This is the ICO file used in the tool:
Image
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

User avatar
Lejo
Member
 
Posts: 534
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

User avatar
DS-minetest
Member
 
Posts: 1090
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

Re: [CSM] Unicode Parser [unicodeparser]

by DS-minetest » Tue Jan 08, 2019 18:24

Lejo wrote:I tried this mod, but i only get a empty output in chat.
Whats' the Problem?

Maybe in your settings the CHAT_MESSAGES restriction flag is set.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
muhdnurhidayat
Member
 
Posts: 295
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [CSM] Unicode Parser [unicodeparser]

by muhdnurhidayat » Thu Jan 10, 2019 10:03

DS-minetest wrote:
Lejo wrote:I tried this mod, but i only get a empty output in chat.
Whats' the Problem?

Maybe in your settings the CHAT_MESSAGES restriction flag is set.

It should be working if you use latest stable (0.4.17.1) but it might not working if you use devs version (eg. 5.0.0) because they added in CSM restrictions in devs version.

Also note that it's a CSM (client side mod), don't put it in normal mods folder, instead put it in clientmods folder.
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

User avatar
Lejo
Member
 
Posts: 534
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [CSM] Unicode Parser [unicodeparser]

by Lejo » Thu Jan 10, 2019 14:22

muhdnurhidayat wrote:It should be working if you use latest stable (0.4.17.1) but it might not working if you use devs version (eg. 5.0.0) because they added in CSM restrictions in devs version.

I'm using 0.4.17 so this should be no problem
Also note that it's a CSM (client side mod), don't put it in normal mods folder, instead put it in clientmods folder.

I have it in the correct folder otherwise I couldn't use the .uc or .ug command.
I'm allays sending empty:
Code: Select all
<Lejo>

I also tried it on a different computer with 0.4.16
 

User avatar
Lone_Wolf
Member
 
Posts: 2144
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf
 

User avatar
Lejo
Member
 
Posts: 534
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [CSM] Unicode Parser [unicodeparser]

by Lejo » Fri Jan 11, 2019 13:35

Try using a different font @Lejo

How can I change it?

I think it's a regular problem with this special charcters.
For example this using CSM also outputs empty(<Lejo> ):
Code: Select all
minetest.register_chatcommand("e", {
  description = "Open the Emoji gui.",
  func = function(name, escuni)
    minetest.send_chat_message("你好")
  end
})

PS: I'm testing in Ubuntu minetest 0.4.17 or using Wine the Windows build, same for both.
Edit:
I also tried this:
Code: Select all
-- command .dummy
minetest.register_chatcommand("dummy", {
   params = "<arg>",
   description = "Dummy function",
   func = function(param)
      local message = "[\xF0\xA0\x80\x8B]" -- \U0002000B
      minetest.log(message) -- works:  visible in debug.txt
      minetest.display_chat_message(message) -- works: visible in game
      minetest.send_chat_message(message) -- doesn't work: truncated to 0x000B

   end
})

I only get the correct output in the debug.
 

User avatar
Lone_Wolf
Member
 
Posts: 2144
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [CSM] Unicode Parser [unicodeparser]

by Lone_Wolf » Fri Jan 11, 2019 16:06

Lejo wrote:
Try using a different font @Lejo

How can I change it?

I think it's a regular problem with this special charcters.
For example this using CSM also outputs empty(<Lejo> ):
Code: Select all
minetest.register_chatcommand("e", {
  description = "Open the Emoji gui.",
  func = function(name, escuni)
    minetest.send_chat_message("你好")
  end
})

PS: I'm testing in Ubuntu minetest 0.4.17 or using Wine the Windows build, same for both.
Edit:
I also tried this:
Code: Select all
-- command .dummy
minetest.register_chatcommand("dummy", {
   params = "<arg>",
   description = "Dummy function",
   func = function(param)
      local message = "[\xF0\xA0\x80\x8B]" -- \U0002000B
      minetest.log(message) -- works:  visible in debug.txt
      minetest.display_chat_message(message) -- works: visible in game
      minetest.send_chat_message(message) -- doesn't work: truncated to 0x000B

   end
})

I only get the correct output in the debug.


Search 'font' in your advanced settings. If needed I can probably give you a step-by-step tutorial on how to change it. If your changes break MT then you'll need to remove the font setting in your minetest.conf
 

User avatar
Lejo
Member
 
Posts: 534
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 1 guest