Unicode through entities?

Posted by Radiosilence on Mon 28 Jul 2008 11:47 PM — 3 posts, 14,339 views.

#0
I am wondering if it's possible to output unicode entities from the server, such as ░▒▓♪♫, and have MUSHClient convert them properly to their unicode characters?
#1
To clarify, I am talking about inside of an MXP/Pueblo tag. I was able to out some of the more standard entities, but I am wondering if I am output Unicode in this manner..
Australia Forum Administrator #2
It doesn't handle it natively as there is a check that the number does not exceed 255.

However if you install this plugin, it converts the entities to UTF8 sequences, and provided you have Unicode checked in your output window configuration, it should work. The ones you gave seemed to work for me.

Save between the lines as Convert_UTF8_Entities.xml and use File -> Plugins to load that as a plugin.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Convert_UTF8_Entities"
   author="Nick Gammon"
   id="553e3b6c1df8c269dca744c8"
   language="Lua"
   purpose="Converts MXP entities to UTF8"
   date_written="2008-07-29"
   requires="4.06"
   version="1.0"
   >

</plugin>

<!--  Script  -->
<script>
<![CDATA[

function OnPluginPacketReceived (s)
  return (string.gsub (s, "%&#(%d+);", utils.utf8encode  ))
end -- function OnPluginPacketReceived

]]>
</script>

</muclient>