Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ API functions multi-byte safety between input and script
|
API functions multi-byte safety between input and script
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Fiendish
USA (2,551 posts) Bio
Global Moderator |
| Date
| Mon 12 Feb 2018 10:25 PM (UTC) |
| Message
| If run from the input bar via script prefix,
shows nothing, which is unexpected
and
grabs
which is expected.
If run in a script (say, inside a plugin)
shows
which is expected
and
grabs
which is unexpected
Is there something I should be doing to make those unexpected results look more like the expected ones? |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 13 Feb 2018 08:52 PM (UTC) |
| Message
| If I have UTF-8 turned off for the output window, and Dina as the font, then your first example works for me.
If I turn UTF-8 on then it isn't rendered.
As for the clipboard, are you running with UTF-8 enabled or not? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Fiendish
USA (2,551 posts) Bio
Global Moderator |
| Date
| Reply #2 on Tue 13 Feb 2018 09:25 PM (UTC) Amended on Tue 13 Feb 2018 09:33 PM (UTC) by Fiendish
|
| Message
| | Enabled. Otherwise I can't use ╔═══ for drawing maps in main output. Except that this is for a different plugin than the one that wants UTF8 output enabled, so I guess I need a solution that doesn't care. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Fiendish
USA (2,551 posts) Bio
Global Moderator |
| Date
| Reply #3 on Tue 13 Feb 2018 09:39 PM (UTC) Amended on Tue 13 Feb 2018 09:40 PM (UTC) by Fiendish
|
| Message
| | Side note, I'm pretty sure that only single byte characters matter for this, since Aardwolf doesn't actually support players sending utf8. So I guess maybe I need to convert everything to non-utf8 equivalent characters which should look identical. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Fiendish
USA (2,551 posts) Bio
Global Moderator |
| Date
| Reply #4 on Tue 13 Feb 2018 10:04 PM (UTC) Amended on Tue 13 Feb 2018 10:50 PM (UTC) by Fiendish
|
| Message
| | Hmm. There's no utils.utf8unconvert. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Fiendish
USA (2,551 posts) Bio
Global Moderator |
| Date
| Reply #5 on Wed 14 Feb 2018 07:57 AM (UTC) |
| Message
| I implemented my own utf8unconvert in Lua to replace low utf8 with extended ascii bytes, so I can now put "¯" into the clipboard from a script, but I'm not sure what to do about higher utf8 symbols like "╔"...
SetClipboard("╔════════════")
still produces
â•”â•â•â•â•â•â•â•â•â•â•â•â•
|
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Wed 14 Feb 2018 08:26 AM (UTC) |
| Message
| Bear with me for a bit. We have had wild weather, the power failed, and now my Internet access is limited because the modem won't connect to the network.
I am writing this using a WiFi hotspot from my phone. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Sat 17 Feb 2018 07:10 AM (UTC) |
| Message
| I can't reproduce that. If I copy that SetClipboard line from your post and use it in the MUSHclient command window it appears like this:
SetClipboard("+------------")
And that copies to the clipboard OK. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,959 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top