Would it be possible to add the reverse functionality of this plugin, ie translating HTML entities into UTF-8?
What about GeanyLua? And something like this ```lua -- HTML-entity-to-symbol.lua (cross-platform) -- 2023.05.21 --[[ EntitiesToUTF8(): see https://stackoverflow.com/questions/18694131/how-to-convert-utf8-byte-arrays... ]]
local aentities = { ["Á"] = ["Á"], ["á"] = ["á"], ["Ă"] = ["Ă"], ["ă"] = ["ă"], ["∾"] = ["∾"], ["∿"] = ["∿"], ["Â"] = ["Â"], ["â"] = ["â"], ["´"] = ["´"], ["Æ"] = ["Æ"], ["æ"] = ["æ"], ["À"] = ["À"], ["à"] = ["à"], ["ℵ"] = ["ℵ"], ["Α"] = ["Α"], ["α"] = ["α"], ["Ā"] = ["Ā"], ["ā"] = ["ā"], ["&"] = ["&"], ["∧"] = ["∧"], ["∠"] = ["∠"], ["∡"] = ["∡"], ["∟"] = ["∟"], ["⊾"] = ["⊾"], ["∢"] = ["∢"], ["Ą"] = ["Ą"], ["ą"] = ["ą"], ["≋"] = ["≋"], ["'"] = ["'"], ["≊"] = ["≊"], ["Å"] = ["Å"], ["å"] = ["å"], ["*"] = ["*"], ["≈"] = ["≈"], ["≍"] = ["≍"], ["Ã"] = ["Ã"], ["ã"] = ["ã"], ["Ä"] = ["Ä"], ["ä"] = ["ä"], ["∳"] = ["∳"], ["϶"] = ["϶"], ["⊽"] = ["⊽"], ["≌"] = ["≌"], ["„"] = ["„"], ["∵"] = ["∵"], ["ℬ"] = ["ℬ"], ["Β"] = ["Β"], ["β"] = ["β"], ["ℶ"] = ["ℶ"], ["≬"] = ["≬"], ["⋈"] = ["⋈"], ["‵"] = ["‵"], ["¦"] = ["¦"], ["⁏"] = ["⁏"], ["∽"] = ["∽"], ["⋍"] = ["⋍"], ["\"] = ["\"], ["•"] = ["•"], ["≎"] = ["≎"], ["≏"] = ["≏"], ["Ć"] = ["Ć"], ["ć"] = ["ć"], ["∩"] = ["∩"], ["⋒"] = ["⋒"], ["⁁"] = ["⁁"], ["Č"] = ["Č"], ["č"] = ["č"], ["Ç"] = ["Ç"], ["ç"] = ["ç"], ["Ĉ"] = ["Ĉ"], ["ĉ"] = ["ĉ"], ["∰"] = ["∰"], ["Ċ"] = ["Ċ"], ["ċ"] = ["ċ"], ["¸"] = ["¸"], ["¢"] = ["¢"], ["ℭ"] = ["ℭ"], ["✓"] = ["✓"], ["Χ"] = ["Χ"], ["χ"] = ["χ"], ["ˆ"] = ["ˆ"], ["≗"] = ["≗"], ["♣"] = ["♣"], [":"] = [":"], ["∷"] = ["∷"], ["≔"] = ["≔"], [","] = [","], ["@"] = ["@"], ["∁"] = ["∁"], ["∘"] = ["∘"], ["≅"] = ["≅"], ["∮"] = ["∮"], ["∯"] = ["∯"], ["ℂ"] = ["ℂ"], ["∐"] = ["∐"], ["©"] = ["©"], ["℗"] = ["℗"], ["↵"] = ["↵"], ["✗"] = ["✗"], ["⋯"] = ["⋯"], ["⤸"] = ["⤸"], ["⤵"] = ["⤵"], ["⋞"] = ["⋞"], ["⋟"] = ["⋟"], ["↶"] = ["↶"], ["⤽"] = ["⤽"], ["∪"] = ["∪"], ["⋓"] = ["⋓"], ["⊍"] = ["⊍"], ["↷"] = ["↷"], ["⤼"] = ["⤼"], ["¤"] = ["¤"], ["¤t;"] = ["¤"], ["⋎"] = ["⋎"], ["⋏"] = ["⋏"], ["∲"] = ["∲"], ["∱"] = ["∱"], ["†"] = ["†"], ["‡"] = ["‡"], ["ℸ"] = ["ℸ"], ["↓"] = ["↓"], ["↡"] = ["↡"], ["⇓"] = ["⇓"], ["⊣"] = ["⊣"], ["Ď"] = ["Ď"], ["ď"] = ["ď"], ["ⅅ"] = ["ⅅ"], ["ⅆ"] = ["ⅆ"], ["⇊"] = ["⇊"], ["⤑"] = ["⤑"], ["°"] = ["°"], ["Δ"] = ["Δ"], ["δ"] = ["δ"], ["⥿"] = ["⥿"], ["⥥"] = ["⥥"], ["⇃"] = ["⇃"], ["⇂"] = ["⇂"], ["⋄"] = ["⋄"], ["♦"] = ["♦"], ["⋲"] = ["⋲"], ["÷"] = ["÷"], ["⋇"] = ["⋇"], ["$"] = ["$"], ["⤓"] = ["⤓"], ["̑"] = ["̑"], ["⥐"] = ["⥐"], ["⥞"] = ["⥞"], ["⥖"] = ["⥖"], ["⥟"] = ["⥟"], ["⥗"] = ["⥗"], ["Đ"] = ["Đ"], ["đ"] = ["đ"], ["⋱"] = ["⋱"], ["⇵"] = ["⇵"], ["⥯"] = ["⥯"], ["⟿"] = ["⟿"], ["É"] = ["É"], ["é"] = ["é"], ["Ě"] = ["Ě"], ["ě"] = ["ě"], ["≖"] = ["≖"], ["Ê"] = ["Ê"], ["ê"] = ["ê"], ["≕"] = ["≕"], ["Ė"] = ["Ė"], ["ė"] = ["ė"], ["≑"] = ["≑"], ["ⅇ"] = ["ⅇ"], ["≒"] = ["≒"], ["È"] = ["È"], ["è"] = ["è"], ["ℓ"] = ["ℓ"], ["Ē"] = ["Ē"], ["ē"] = ["ē"], ["∅"] = ["∅"], [" "] = [" "], ["Ŋ"] = ["Ŋ"], ["ŋ"] = ["ŋ"], [" "] = [" "], ["Ę"] = ["Ę"], ["ę"] = ["ę"], ["⋕"] = ["⋕"], ["Ε"] = ["Ε"], ["ε"] = ["ε"], ["="] = ["="], ["≟"] = ["≟"], ["≡"] = ["≡"], ["⥱"] = ["⥱"], ["≓"] = ["≓"], ["ℯ"] = ["ℯ"], ["ℰ"] = ["ℰ"], ["≐"] = ["≐"], ["≂"] = ["≂"], ["Η"] = ["Η"], ["η"] = ["η"], ["Ð"] = ["Ð"], ["ð"] = ["ð"], ["Ë"] = ["Ë"], ["ë"] = ["ë"], ["€"] = ["€"], ["!"] = ["!"], ["∃"] = ["∃"], ["♀"] = ["♀"], ["♭"] = ["♭"], ["ƒ"] = ["ƒ"], ["∀"] = ["∀"], ["⋔"] = ["⋔"], ["½"] = ["½"], ["⅓"] = ["⅓"], ["¼"] = ["¼"], ["⅕"] = ["⅕"], ["⅙"] = ["⅙"], ["⅛"] = ["⅛"], ["⅔"] = ["⅔"], ["⅖"] = ["⅖"], ["¾"] = ["¾"], ["⅗"] = ["⅗"], ["⅜"] = ["⅜"], ["⅘"] = ["⅘"], ["⅚"] = ["⅚"], ["⅝"] = ["⅝"], ["⅞"] = ["⅞"], ["⁄"] = ["⁄"], ["ℱ"] = ["ℱ"], ["Γ"] = ["Γ"], ["γ"] = ["γ"], ["Ϝ"] = ["Ϝ"], ["ϝ"] = ["ϝ"], ["Ğ"] = ["Ğ"], ["ğ"] = ["ğ"], ["Ģ"] = ["Ģ"], ["Ĝ"] = ["Ĝ"], ["ĝ"] = ["ĝ"], ["Ġ"] = ["Ġ"], ["ġ"] = ["ġ"], ["≥"] = ["≥"], ["≧"] = ["≧"], ["⋛"] = ["⋛"], ["⋙"] = ["⋙"], ["ℷ"] = ["ℷ"], ["≷"] = ["≷"], ["≩"] = ["≩"], ["⋧"] = ["⋧"], ["`"] = ["`"], ["ℊ"] = ["ℊ"], ["≳"] = ["≳"], [">"] = [">"], ["≫"] = ["≫"], ["⋗"] = ["⋗"], ["⥸"] = ["⥸"], ["ℋ"] = ["ℋ"], ["↔"] = ["↔"], ["⇔"] = ["⇔"], ["⥈"] = ["⥈"], ["↭"] = ["↭"], ["^"] = ["^"], ["Ĥ"] = ["Ĥ"], ["ĥ"] = ["ĥ"], ["♥"] = ["♥"], ["…"] = ["…"], ["⊹"] = ["⊹"], ["ℌ"] = ["ℌ"], ["⇿"] = ["⇿"], ["∻"] = ["∻"], ["ℍ"] = ["ℍ"], ["―"] = ["―"], ["Ħ"] = ["Ħ"], ["ħ"] = ["ħ"], ["⁃"] = ["⁃"], ["‐"] = ["‐"], ["Í"] = ["Í"], ["í"] = ["í"], ["Î"] = ["Î"], ["î"] = ["î"], ["İ"] = ["İ"], ["¡"] = ["¡"], ["Ì"] = ["Ì"], ["ì"] = ["ì"], ["ⅈ"] = ["ⅈ"], ["∭"] = ["∭"], ["℩"] = ["℩"], ["IJ"] = ["IJ"], ["ij"] = ["ij"], ["Ī"] = ["Ī"], ["ī"] = ["ī"], ["ℑ"] = ["ℑ"], ["ı"] = ["ı"], ["⊷"] = ["⊷"], ["℅"] = ["℅"], ["∞"] = ["∞"], ["∫"] = ["∫"], ["∬"] = ["∬"], ["⊺"] = ["⊺"], ["Į"] = ["Į"], ["į"] = ["į"], ["Ι"] = ["Ι"], ["ι"] = ["ι"], ["¿"] = ["¿"], ["ℐ"] = ["ℐ"], ["∈"] = ["∈"], ["⋵"] = ["⋵"], ["⋹"] = ["⋹"], ["⋴"] = ["⋴"], ["⋳"] = ["⋳"], ["Ĩ"] = ["Ĩ"], ["ĩ"] = ["ĩ"], ["Ï"] = ["Ï"], ["ï"] = ["ï"], ["Ĵ"] = ["Ĵ"], ["ĵ"] = ["ĵ"], ["Κ"] = ["Κ"], ["κ"] = ["κ"], ["Ķ"] = ["Ķ"], ["ķ"] = ["ķ"], ["ĸ"] = ["ĸ"], ["⇚"] = ["⇚"], ["Ĺ"] = ["Í"], ["Ĺ"] = ["Ĺ"], ["ĺ"] = ["ĺ"], ["Λ"] = ["Λ"], ["λ"] = ["λ"], ["⟨"] = ["〈"], ["«"] = ["«"], ["←"] = ["←"], ["↞"] = ["↞"], ["⇐"] = ["⇐"], ["⇤"] = ["⇤"], ["⤟"] = ["⤟"], ["⤝"] = ["⤝"], ["↩"] = ["↩"], ["↫"] = ["↫"], ["⤹"] = ["⤹"], ["⥳"] = ["⥳"], ["↢"] = ["↢"], ["&larrw;"] = ["↜"], ["⤙"] = ["⤙"], ["⤛"] = ["⤛"], ["⤌"] = ["⤌"], ["⤎"] = ["⤎"], ["❲"] = ["❲"], ["{"] = ["{"], ["["] = ["["], ["Ľ"] = ["Ľ"], ["ľ"] = ["ľ"], ["Ļ"] = ["Ļ"], ["ļ"] = ["ļ"], ["⌈"] = ["⌈"], ["&Lcirc;"] = ["Î"], ["{"] = ["{"], ["⤶"] = ["⤶"], ["“"] = ["“"], ["⥧"] = ["⥧"], ["⥋"] = ["⥋"], ["↲"] = ["↲"], ["≤"] = ["≤"], ["≦"] = ["≦"], ["⥡"] = ["⥡"], ["⥙"] = ["⥙"], ["⥎"] = ["⥎"], ["⥚"] = ["⥚"], ["⥑"] = ["⥑"], ["⥠"] = ["⥠"], ["⥘"] = ["⥘"], ["⥒"] = ["⥒"], ["⋚"] = ["⋚"], ["⥼"] = ["⥼"], ["⌊"] = ["⌊"], ["≶"] = ["≶"], ["&Lgrave;"] = ["Ì"], ["⥢"] = ["⥢"], ["↽"] = ["↽"], ["↼"] = ["↼"], ["⥪"] = ["⥪"], ["⋘"] = ["⋘"], ["⇇"] = ["⇇"], ["⥫"] = ["⥫"], ["Ŀ"] = ["Ŀ"], ["ŀ"] = ["ŀ"], ["≨"] = ["≨"], ["⋦"] = ["⋦"], ["⇽"] = ["⇽"], ["∗"] = ["∗"], ["_"] = ["_"], ["◊"] = ["◊"], ["("] = ["("], ["⇆"] = ["⇆"], ["⇋"] = ["⇋"], ["⥭"] = ["⥭"], ["‎"] = ["‎"], ["⊿"] = ["⊿"], ["‹"] = ["‹"], ["ℒ"] = ["ℒ"], ["↰"] = ["↰"], ["≲"] = ["≲"], ["["] = ["["], ["‘"] = ["‘"], ["Ł"] = ["Ł"], ["ł"] = ["ł"], ["<"] = ["<"], ["≪"] = ["≪"], ["⋖"] = ["⋖"], ["⋋"] = ["⋋"], ["⋉"] = ["⋉"], ["⥶"] = ["⥶"], ["⊴"] = ["⊴"], ["&Luml;"] = ["Ï"], ["⥊"] = ["⥊"], ["⥦"] = ["⥦"], ["¯"] = ["¯"], ["♂"] = ["♂"], ["✠"] = ["✠"], ["⤅"] = ["⤅"], ["↧"] = ["↧"], ["↤"] = ["↤"], ["&mapstoright;"] = ["↦"], ["↥"] = ["↥"], ["—"] = ["—"], ["∺"] = ["∺"], ["℧"] = ["℧"], ["µ"] = ["µ"], ["∣"] = ["∣"], ["·"] = ["·"], ["−"] = ["-"], ["−"] = ["−"], ["⊟"] = ["⊟"], ["∸"] = ["∸"], ["∓"] = ["∓"], ["⊧"] = ["⊧"], ["ℳ"] = ["ℳ"], ["Μ"] = ["Μ"], ["μ"] = ["μ"], ["⊸"] = ["⊸"], ["∇"] = ["∇"], ["Ń"] = ["Ń"], ["ń"] = ["ń"], ["≉"] = ["≉"], ["ʼn"] = ["ʼn"], ["♮"] = ["♮"], [" "] = [" "], ["Ň"] = ["Ň"], ["ň"] = ["ň"], ["Ņ"] = ["Ņ"], ["ņ"] = ["ņ"], ["≇"] = ["≇"], ["–"] = ["–"], ["≠"] = ["≠"], ["⤤"] = ["⤤"], ["↗"] = ["↗"], ["⇗"] = ["⇗"], ["≢"] = ["≢"], ["⤨"] = ["⤨"], ["∄"] = ["∄"], ["≱"] = ["≱"], ["≵"] = ["≵"], ["≯"] = ["≯"], ["↮"] = ["↮"], ["⇎"] = ["⇎"], ["∋"] = ["∋"], ["∋"] = ["∗"], ["⋼"] = ["⋼"], ["⋺"] = ["⋺"], ["↚"] = ["↚"], ["⇍"] = ["⇍"], ["‥"] = ["‥"], ["≰"] = ["≰"], ["≴"] = ["≴"], ["≮"] = ["≮"], ["⋪"] = ["⋪"], ["⋬"] = ["⋬"], ["∤"] = ["∤"], ["ℕ"] = ["ℕ"], ["¬"] = ["¬"], ["≭"] = ["≭"], ["∉"] = ["∉"], ["⋷"] = ["⋷"], ["⋶"] = ["⋶"], ["∌"] = ["∌"], ["⋾"] = ["⋾"], ["⋽"] = ["⋽"], ["∦"] = ["∦"], ["⊀"] = ["⊀"], ["⋠"] = ["⋠"], ["↛"] = ["↛"], ["⇏"] = ["⇏"], ["⋫"] = ["⋫"], ["⋭"] = ["⋭"], ["⊁"] = ["⊁"], ["⋡"] = ["⋡"], ["≁"] = ["≁"], ["≄"] = ["≄"], ["⋢"] = ["⋢"], ["⋣"] = ["⋣"], ["⊄"] = ["⊄"], ["⊈"] = ["⊈"], ["⊅"] = ["⊅"], ["⊉"] = ["⊉"], ["≹"] = ["≹"], ["Ñ"] = ["Ñ"], ["ñ"] = ["ñ"], ["≸"] = ["≸"], ["Ν"] = ["Ν"], ["ν"] = ["ν"], ["#"] = ["#"], ["№"] = ["№"], ["⊬"] = ["⊬"], ["⊭"] = ["⊭"], ["⊮"] = ["⊮"], ["⊯"] = ["⊯"], ["⤄"] = ["⤄"], ["⤂"] = ["⤂"], ["⤃"] = ["⤃"], ["⤣"] = ["⤣"], ["↖"] = ["↖"], ["⇖"] = ["⇖"], ["⤧"] = ["⤧"], ["Ó"] = ["Ó"], ["ó"] = ["ó"], ["⊛"] = ["⊛"], ["⊚"] = ["⊚"], ["Ô"] = ["Ô"], ["ô"] = ["ô"], ["⊝"] = ["⊝"], ["Ő"] = ["Ő"], ["ő"] = ["ő"], ["⊙"] = ["⊙"], ["Œ"] = ["Œ"], ["œ"] = ["œ"], ["Ò"] = ["Ò"], ["ò"] = ["ò"], ["↺"] = ["↺"], ["‾"] = ["‾"], ["Ō"] = ["Ō"], ["ō"] = ["ō"], ["Ω"] = ["Ω"], ["ω"] = ["ω"], ["Ο"] = ["Ο"], ["ο"] = ["ο"], ["⊖"] = ["⊖"], ["⊕"] = ["⊕"], ["∨"] = ["∨"], ["↻"] = ["↻"], ["ª"] = ["ª"], ["º"] = ["º"], ["⊶"] = ["⊶"], ["ℴ"] = ["ℴ"], ["Ø"] = ["Ø"], ["ø"] = ["ø"], ["⊘"] = ["⊘"], ["Õ"] = ["Õ"], ["õ"] = ["õ"], ["⊗"] = ["⊗"], ["Ö"] = ["Ö"], ["ö"] = ["ö"], ["¶"] = ["¶"], ["∥"] = ["∥"], ["∂"] = ["∂"], ["%"] = ["%"], ["."] = ["."], ["‰"] = ["‰"], ["‰"] = ["‰"], ["⊥"] = ["⊥"], ["‱"] = ["‱"], ["Φ"] = ["Φ"], ["φ"] = ["φ"], ["☎"] = ["☎"], ["Π"] = ["Π"], ["π"] = ["π"], ["ϖ"] = ["ϖ"], ["ℏ"] = ["ℏ"], ["ℎ"] = ["ℎ"], ["+"] = ["+"], ["⊞"] = ["⊞"], ["∔"] = ["∔"], ["±"] = ["±"], ["ℙ"] = ["ℙ"], ["£"] = ["£"], ["≺"] = ["≺"], ["≼"] = ["≼"], ["′"] = ["′"], ["″"] = ["″"], ["⋨"] = ["⋨"], ["∏"] = ["∏"], ["∝"] = ["∝"], ["≾"] = ["≾"], ["⊰"] = ["⊰"], ["Ψ"] = ["Ψ"], ["ψ"] = ["ψ"], ["ℚ"] = ["ℚ"], ["⁗"] = ["⁗"], ["?"] = ["?"], ["""] = ["""], ["⇛"] = ["⇛"], ["Ŕ"] = ["Ŕ"], ["ŕ"] = ["ŕ"], ["√"] = ["√"], ["⟩"] = ["〉"], ["»"] = ["»"], ["→"] = ["→"], ["↠"] = ["↠"], ["⇒"] = ["⇒"], ["⥵"] = ["⥵"], ["⇥"] = ["⇥"], ["⤠"] = ["⤠"], ["⤳"] = ["⤳"], ["⤞"] = ["⤞"], ["↪"] = ["↪"], ["↬"] = ["↬"], ["⥅"] = ["⥅"], ["⥴"] = ["⥴"], ["⤖"] = ["⤖"], ["↣"] = ["↣"], ["↝"] = ["↝"], ["⤚"] = ["⤚"], ["⤜"] = ["⤜"], ["∶"] = ["∶"], ["⤍"] = ["⤍"], ["⤏"] = ["⤏"], ["⤐"] = ["⤐"], ["❳"] = ["❳"], ["}"] = ["}"], ["]"] = ["]"], ["Ř"] = ["Ř"], ["ř"] = ["ř"], ["Ŗ"] = ["Ŗ"], ["ŗ"] = ["ŗ"], ["⌉"] = ["⌉"], ["}"] = ["}"], ["⤷"] = ["⤷"], ["⥩"] = ["⥩"], ["”"] = ["”"], ["↳"] = ["↳"], ["ℜ"] = ["ℜ"], ["®"] = ["®"], ["⥽"] = ["⥽"], ["⌋"] = ["⌋"], ["⥤"] = ["⥤"], ["⇁"] = ["⇁"], ["⇀"] = ["⇀"], ["⥬"] = ["⥬"], ["Ρ"] = ["Ρ"], ["ρ"] = ["ρ"], ["⥝"] = ["⥝"], ["⥕"] = ["⥕"], ["⥛"] = ["⥛"], ["⥏"] = ["⥏"], ["⥜"] = ["⥜"], ["⥔"] = ["⥔"], ["⥓"] = ["⥓"], ["⇄"] = ["⇄"], ["⇌"] = ["⇌"], ["‏"] = ["‏"], ["⇾"] = ["⇾"], ["ℝ"] = ["ℝ"], ["⥰"] = ["⥰"], [")"] = [")"], ["⇉"] = ["⇉"], ["›"] = ["›"], ["ℛ"] = ["ℛ"], ["↱"] = ["↱"], ["]"] = ["]"], ["’"] = ["’"], ["⋌"] = ["⋌"], ["⋊"] = ["⋊"], ["⊵"] = ["⊵"], ["⥨"] = ["⥨"], ["℞"] = ["℞"], ["Ś"] = ["Ś"], ["ś"] = ["ś"], ["‚"] = ["‚"], ["≻"] = ["≻"], ["Š"] = ["Š"], ["š"] = ["š"], ["≽"] = ["≽"], ["Ş"] = ["Ş"], ["ş"] = ["ş"], ["Ŝ"] = ["Ŝ"], ["ŝ"] = ["ŝ"], ["⋩"] = ["⋩"], ["≿"] = ["≿"], ["⋅"] = ["⋅"], ["⊡"] = ["⊡"], ["⤥"] = ["⤥"], ["↘"] = ["↘"], ["⇘"] = ["⇘"], ["§"] = ["§"], [";"] = [";"], ["⤩"] = ["⤩"], ["∖"] = ["∖"], ["✶"] = ["✶"], ["♯"] = ["♯"], ["­"] = ["­"], ["Σ"] = ["Σ"], ["σ"] = ["σ"], ["ς"] = ["ς"], ["∼"] = ["∼"], ["≃"] = ["≃"], ["≆"] = ["≆"], ["⥲"] = ["⥲"], ["/"] = ["/"], ["♠"] = ["♠"], ["⊓"] = ["⊓"], ["⊔"] = ["⊔"], ["⊏"] = ["⊏"], ["⊑"] = ["⊑"], ["⊐"] = ["⊐"], ["⊒"] = ["⊒"], ["⋆"] = ["⋆"], ["☆"] = ["☆"], ["★"] = ["★"], ["ϵ"] = ["ϵ"], ["ϕ"] = ["ϕ"], ["⊂"] = ["⊂"], ["⋐"] = ["⋐"], ["⊆"] = ["⊆"], ["⊊"] = ["⊊"], ["⥹"] = ["⥹"], ["∑"] = ["∑"], ["♪"] = ["♪"], ["¹"] = ["¹"], ["²"] = ["²"], ["³"] = ["³"], ["⊃"] = ["⊃"], ["⋑"] = ["⋑"], ["⊇"] = ["⊇"], ["⥻"] = ["⥻"], ["⊋"] = ["⊋"], ["⤦"] = ["⤦"], ["↙"] = ["↙"], ["⇙"] = ["⇙"], ["⤪"] = ["⤪"], ["ß"] = ["ß"], ["Τ"] = ["Τ"], ["τ"] = ["τ"], ["Ť"] = ["Ť"], ["ť"] = ["ť"], ["Ţ"] = ["Ţ"], ["ţ"] = ["ţ"], ["∴"] = ["∴"], ["Θ"] = ["Θ"], ["θ"] = ["θ"], ["ϑ"] = ["ϑ"], [" "] = [" "], ["Þ"] = ["Þ"], ["þ"] = ["þ"], ["˜"] = ["~"], ["×"] = ["×"], ["⊠"] = ["⊠"], ["⊤"] = ["⊤"], ["‴"] = ["‴"], ["™"] = ["™"], ["≜"] = ["≜"], ["Ŧ"] = ["Ŧ"], ["ŧ"] = ["ŧ"], ["Ú"] = ["Ú"], ["ú"] = ["ú"], ["↑"] = ["↑"], ["↟"] = ["↟"], ["⇑"] = ["⇑"], ["⥉"] = ["⥉"], ["Ŭ"] = ["Ŭ"], ["ŭ"] = ["ŭ"], ["Û"] = ["Û"], ["û"] = ["û"], ["⇅"] = ["⇅"], ["Ű"] = ["Ű"], ["ű"] = ["ű"], ["⥮"] = ["⥮"], ["⥾"] = ["⥾"], ["Ù"] = ["Ù"], ["ù"] = ["ù"], ["⥣"] = ["⥣"], ["↿"] = ["↿"], ["↾"] = ["↾"], ["Ū"] = ["Ū"], ["ū"] = ["ū"], ["¨"] = ["¨"], ["Ų"] = ["Ų"], ["ų"] = ["ų"], ["⤒"] = ["⤒"], ["⊎"] = ["⊎"], ["ϒ"] = ["ϒ"], ["Υ"] = ["Υ"], ["υ"] = ["υ"], ["Ů"] = ["Ů"], ["ů"] = ["ů"], ["⋰"] = ["⋰"], ["Ũ"] = ["Ũ"], ["ũ"] = ["ũ"], ["⇈"] = ["⇈"], ["Ü"] = ["Ü"], ["ü"] = ["ü"], ["ϰ"] = ["ϰ"], ["↕"] = ["↕"], ["⇕"] = ["⇕"], ["ϱ"] = ["ϱ"], ["⊢"] = ["⊢"], ["⊨"] = ["⊨"], ["⊩"] = ["⊩"], ["⊫"] = ["⊫"], ["⊻"] = ["⊻"], ["≚"] = ["≚"], ["⋮"] = ["⋮"], ["|"] = ["|"], ["|"] = ["|"], ["‖"] = ["‖"], ["❘"] = ["❘"], ["⊲"] = ["⊲"], ["⊳"] = ["⊳"], ["⊪"] = ["⊪"], ["Ŵ"] = ["Ŵ"], ["ŵ"] = ["ŵ"], ["≙"] = ["≙"], ["℘"] = ["℘"], ["≀"] = ["≀"], ["⋂"] = ["⋂"], ["⋃"] = ["⋃"], ["⟷"] = ["⟷"], ["⟺"] = ["⟺"], ["Ξ"] = ["Ξ"], ["ξ"] = ["ξ"], ["⟵"] = ["⟵"], ["⟸"] = ["⟸"], ["⟼"] = ["⟼"], ["⋻"] = ["⋻"], ["⟶"] = ["⟶"], ["⟹"] = ["⟹"], ["⋁"] = ["⋁"], ["⋀"] = ["⋀"], ["Ý"] = ["Ý"], ["ý"] = ["ý"], ["Ŷ"] = ["Ŷ"], ["ŷ"] = ["ŷ"], ["¥"] = ["¥"], ["ÿ"] = ["ÿ"], ["Ÿ"] = ["Ÿ"], ["Ź"] = ["Ź"], ["ź"] = ["ź"], ["Ž"] = ["Ž"], ["ž"] = ["ž"], ["Ż"] = ["Ż"], ["ż"] = ["ż"], ["Ζ"] = ["Ζ"], ["ζ"] = ["ζ"], ["ℨ"] = ["ℨ"], ["&ziglarr;"] = ["⇜"], ["⇝"] = ["⇝"], ["ℤ"] = ["ℤ"], ["‍"] = ["‍"], ["‌"] = ["‌"] }
local function EntitiesToUTF8(dec) -- https://stackoverflow.com/questions/18694131/how-to-convert-utf8-byte-arrays... local bytemarkers = {{0x7FF, 192}, {0xFFFF, 224}, {0x1FFFFF, 240}} if dec < 128 then return string.char(dec) end local cbs = {} for bytes, vals in ipairs(bytemarkers) do if dec <= vals[1] then for b = bytes + 1, 2, -1 do local mod = dec % 64 dec = (dec - mod) / 64 cbs[b] = string.char(128 + mod) end cbs[1] = string.char(vals[2] + dec) break end end return table.concat(cbs) end
local sres, ssel, stmp
ssel = geany.selection() if (ssel == nil) or (ssel == "") then geany.message("HTML entity to symbol", "Nothing is selected!") return else if (string.sub(ssel, 1, 1) ~= "&") and (string.sub(ssel, -1, -1) ~= ";") then geany.message("HTML entity to symbol", "Selected text does not look like a HTML entity.") return end end
if ssel == "
" then geany.selection("\n") return end
stmp = aentities[ssel] if stmp == nil then stmp = ssel end if string.sub(stmp, 1, 3) == "&#x" then sres = EntitiesToUTF8(tonumber(string.sub(stmp, 4, -2), 16)) else if string.sub(stmp, 1, 2) == "&#" then sres = EntitiesToUTF8(tonumber(string.sub(stmp, 3, -2), 10)) else return end end if sres ~= ssel then geany.selection(sres) end ```
Documentation: see [here](https://github.com/geany/geany-plugins/tree/master/geanylua/docs), here `/usr/share/doc/geany-plugin-lua` or here `C:\Program Files\Geany\share\doc\geany-plugins\geanylua`.
On 05/29/2023 09:19 AM, Skif-off wrote:
What about GeanyLua? And something like this
-- HTML-entity-to-symbol.lua (cross-platform) -- 2023.05.21 --[[ EntitiesToUTF8(): see https://stackoverflow.com/questions/18694131/how-to-convert-utf8-byte-arrays... ]]
local aentities = { ["Á"] = ["Á"], ["á"] = ["á"], ["Ă"] = ["Ă"], ["ă"] = ["ă"], ["∾"] = ["∾"], ["∿"] = ["∿"], ["Â"] = ["Â"], ["â"] = ["â"], ["´"] = ["´"], ["Æ"] = ["Æ"], ["æ"] = ["æ"], ["À"] = ["À"], ["à"] = ["à"], ["ℵ"] = ["ℵ"], ["Α"] = ["Α"], ["α"] = ["α"], ["Ā"] = ["Ā"], ["ā"] = ["ā"], ["&"] = ["&"], ["∧"] = ["∧"], ["∠"] = ["∠"], ["∡"] = ["∡"], ["∟"] = ["∟"], ["⊾"] = ["⊾"], ["∢"] = ["∢"], ["Ą"] = ["Ą"], ["ą"] = ["ą"], ["≋"] = ["≋"], ["'"] = ["'"], ["≊"] = ["≊"], ["Å"] = ["Å"], ["å"] = ["å"], ["*"] = ["*"], ["≈"] = ["≈"], ["≍"] = ["≍"], ["Ã"] = ["Ã"], ["ã"] = ["ã"], ["Ä"] = ["Ä"], ["ä"] = ["ä"], ["∳"] = ["∳"], ["϶"] = ["϶"], ["⊽"] = ["⊽"], ["≌"] = ["≌"], ["„"] = ["„"], ["∵"] = ["∵"], ["ℬ"] = ["ℬ"], ["Β"] = ["Β"], ["β"] = ["β"], ["ℶ"] = ["ℶ"], ["≬"] = ["≬"], ["⋈"] = ["⋈"], ["‵"] = ["‵"], ["¦"] = ["¦"], ["⁏"] = ["⁏"], ["∽"] = ["∽"], ["⋍"] = ["⋍"], ["\"] = ["\"], ["•"] = ["•"], ["≎"] = ["≎"], ["≏"] = ["≏"], ["Ć"] = ["Ć"], ["ć"] = ["ć"], ["∩"] = ["∩"], ["⋒"] = ["⋒"], ["⁁"] = ["⁁"], ["Č"] = ["Č"], ["č"] = ["č"], ["Ç"] = ["Ç"], ["ç"] = ["ç"], ["Ĉ"] = ["Ĉ"], ["ĉ"] = ["ĉ"], ["∰"] = ["∰"], ["Ċ"] = ["Ċ"], ["ċ"] = ["ċ"], ["¸"] = ["¸"], ["¢"] = ["¢"], ["ℭ"] = ["ℭ"], ["✓"] = ["✓"], ["Χ"] = ["Χ"], ["χ"] = ["χ"], ["ˆ"] = ["ˆ"], ["≗"] = ["≗"], ["♣"] = ["♣"], [":"] = [":"], ["∷"] = ["∷"], ["≔"] = ["≔"], [","] = [","], ["@"] = ["@"], ["∁"] = ["∁"], ["∘"] = ["∘"], ["≅"] = ["≅"], ["∮"] = ["∮"], ["∯"] = ["∯"], ["ℂ"] = ["ℂ"], ["∐"] = ["∐"], ["©"] = ["©"], ["℗"] = ["℗"], ["↵"] = ["↵"], ["✗"] = ["✗"], ["⋯"] = ["⋯"], ["⤸"] = ["⤸"], ["⤵"] = ["⤵"], ["⋞"] = ["⋞"], ["⋟"] = ["⋟"], ["↶"] = ["↶"], ["⤽"] = ["⤽"], ["∪"] = ["∪"], ["⋓"] = ["⋓"], ["⊍"] = ["⊍"], ["↷"] = ["↷"], ["⤼"] = ["⤼"], ["¤"] = ["¤"], ["¤t;"] = ["¤"], ["⋎"] = ["⋎"], ["⋏"] = ["⋏"], ["∲"] = ["∲"], ["∱"] = ["∱"], ["†"] = ["†"], ["‡"] = ["‡"], ["ℸ"] = ["ℸ"], ["↓"] = ["↓"], ["↡"] = ["↡"], ["⇓"] = ["⇓"], ["⊣"] = ["⊣"], ["Ď"] = ["Ď"], ["ď"] = ["ď"], ["ⅅ"] = ["ⅅ"], ["ⅆ"] = ["ⅆ"], ["⇊"] = ["⇊"], ["⤑"] = ["⤑"], ["°"] = ["°"], ["Δ"] = ["Δ"], ["δ"] = ["δ"], ["⥿"] = ["⥿"], ["⥥"] = ["⥥"], ["⇃"] = ["⇃"], ["⇂"] = ["⇂"], ["⋄"] = ["⋄"], ["♦"] = ["♦"], ["⋲"] = ["⋲"], ["÷"] = ["÷"], ["⋇"] = ["⋇"], ["$"] = ["$"], ["⤓"] = ["⤓"], ["̑"] = ["̑"], ["⥐"] = ["⥐"], ["⥞"] = ["⥞"], ["⥖"] = ["⥖"], ["⥟"] = ["⥟"], ["⥗"] = ["⥗"], ["Đ"] = ["Đ"], ["đ"] = ["đ"], ["⋱"] = ["⋱"], ["⇵"] = ["⇵"], ["⥯"] = ["⥯"], ["⟿"] = ["⟿"], ["É"] = ["É"], ["é"] = ["é"], ["Ě"] = ["Ě"], ["ě"] = ["ě"], ["≖"] = ["≖"], ["Ê"] = ["Ê"], ["ê"] = ["ê"], ["≕"] = ["≕"], ["Ė"] = ["Ė"], ["ė"] = ["ė"], ["≑"] = ["≑"], ["ⅇ"] = ["ⅇ"], ["≒"] = ["≒"], ["È"] = ["È"], ["è"] = ["è"], ["ℓ"] = ["ℓ"], ["Ē"] = ["Ē"], ["ē"] = ["ē"], ["∅"] = ["∅"], [" "] = [" "], ["Ŋ"] = ["Ŋ"], ["ŋ"] = ["ŋ"], [" "] = [" "], ["Ę"] = ["Ę"], ["ę"] = ["ę"], ["⋕"] = ["⋕"], ["Ε"] = ["Ε"], ["ε"] = ["ε"], ["="] = ["="], ["≟"] = ["≟"], ["≡"] = ["≡"], ["⥱"] = ["⥱"], ["≓"] = ["≓"], ["ℯ"] = ["ℯ"], ["ℰ"] = ["ℰ"], ["≐"] = ["≐"], ["≂"] = ["≂"], ["Η"] = ["Η"], ["η"] = ["η"], ["Ð"] = ["Ð"], ["ð"] = ["ð"], ["Ë"] = ["Ë"], ["ë"] = ["ë"], ["€"] = ["€"], ["!"] = ["!"], ["∃"] = ["∃"], ["♀"] = ["♀"], ["♭"] = ["♭"], ["ƒ"] = ["ƒ"], ["∀"] = ["∀"], ["⋔"] = ["⋔"], ["½"] = ["½"], ["⅓"] = ["⅓"], ["¼"] = ["¼"], ["⅕"] = ["⅕"], ["⅙"] = ["⅙"], ["⅛"] = ["⅛"], ["⅔"] = ["⅔"], ["⅖"] = ["⅖"], ["¾"] = ["¾"], ["⅗"] = ["⅗"], ["⅜"] = ["⅜"], ["⅘"] = ["⅘"], ["⅚"] = ["⅚"], ["⅝"] = ["⅝"], ["⅞"] = ["⅞"], ["⁄"] = ["⁄"], ["ℱ"] = ["ℱ"], ["Γ"] = ["Γ"], ["γ"] = ["γ"], ["Ϝ"] = ["Ϝ"], ["ϝ"] = ["ϝ"], ["Ğ"] = ["Ğ"], ["ğ"] = ["ğ"], ["Ģ"] = ["Ģ"], ["Ĝ"] = ["Ĝ"], ["ĝ"] = ["ĝ"], ["Ġ"] = ["Ġ"], ["ġ"] = ["ġ"], ["≥"] = ["≥"], ["≧"] = ["≧"], ["⋛"] = ["⋛"], ["⋙"] = ["⋙"], ["ℷ"] = ["ℷ"], ["≷"] = ["≷"], ["≩"] = ["≩"], ["⋧"] = ["⋧"], ["`"] = ["`"], ["ℊ"] = ["ℊ"], ["≳"] = ["≳"], [">"] = [">"], ["≫"] = ["≫"], ["⋗"] = ["⋗"], ["⥸"] = ["⥸"], ["ℋ"] = ["ℋ"], ["↔"] = ["↔"], ["⇔"] = ["⇔"], ["⥈"] = ["⥈"], ["↭"] = ["↭"], ["^"] = ["^"], ["Ĥ"] = ["Ĥ"], ["ĥ"] = ["ĥ"], ["♥"] = ["♥"], ["…"] = ["…"], ["⊹"] = ["⊹"], ["ℌ"] = ["ℌ"], ["⇿"] = ["⇿"], ["∻"] = ["∻"], ["ℍ"] = ["ℍ"], ["―"] = ["―"], ["Ħ"] = ["Ħ"], ["ħ"] = ["ħ"], ["⁃"] = ["⁃"], ["‐"] = ["‐"], ["Í"] = ["Í"], ["í"] = ["í"], ["Î"] = ["Î"], ["î"] = ["î"], ["İ"] = ["İ"], ["¡"] = ["¡"], ["Ì"] = ["Ì"], ["ì"] = ["ì"], ["ⅈ"] = ["ⅈ"], ["∭"] = ["∭"], ["℩"] = ["℩"], ["IJ"] = ["IJ"], ["ij"] = ["ij"], ["Ī"] = ["Ī"], ["ī"] = ["ī"], ["ℑ"] = ["ℑ"], ["ı"] = ["ı"], ["⊷"] = ["⊷"], ["℅"] = ["℅"], ["∞"] = ["∞"], ["∫"] = ["∫"], ["∬"] = ["∬"], ["⊺"] = ["⊺"], ["Į"] = ["Į"], ["į"] = ["į"], ["Ι"] = ["Ι"], ["ι"] = ["ι"], ["¿"] = ["¿"], ["ℐ"] = ["ℐ"], ["∈"] = ["∈"], ["⋵"] = ["⋵"], ["⋹"] = ["⋹"], ["⋴"] = ["⋴"], ["⋳"] = ["⋳"], ["Ĩ"] = ["Ĩ"], ["ĩ"] = ["ĩ"], ["Ï"] = ["Ï"], ["ï"] = ["ï"], ["Ĵ"] = ["Ĵ"], ["ĵ"] = ["ĵ"], ["Κ"] = ["Κ"], ["κ"] = ["κ"], ["Ķ"] = ["Ķ"], ["ķ"] = ["ķ"], ["ĸ"] = ["ĸ"], ["⇚"] = ["⇚"], ["Ĺ"] = ["Í"], ["Ĺ"] = ["Ĺ"], ["ĺ"] = ["ĺ"], ["Λ"] = ["Λ"], ["λ"] = ["λ"], ["⟨"] = ["〈"], ["«"] = ["«"], ["←"] = ["←"], ["↞"] = ["↞"], ["⇐"] = ["⇐"], ["⇤"] = ["⇤"], ["⤟"] = ["⤟"], ["⤝"] = ["⤝"], ["↩"] = ["↩"], ["↫"] = ["↫"], ["⤹"] = ["⤹"], ["⥳"] = ["⥳"], ["↢"] = ["↢"], ["&larrw;"] = ["↜"], ["⤙"] = ["⤙"], ["⤛"] = ["⤛"], ["⤌"] = ["⤌"], ["⤎"] = ["⤎"], ["❲"] = ["❲"], ["{"] = ["{"], ["["] = ["["], ["Ľ"] = ["Ľ"], ["ľ"] = ["ľ"], ["Ļ"] = ["Ļ"], ["ļ"] = ["ļ"], ["⌈"] = ["⌈"], ["&Lcirc;"] = ["Î"], ["{"] = ["{"], ["⤶"] = ["⤶"], ["“"] = ["“"], ["⥧"] = ["⥧"], ["⥋"] = ["⥋"], ["↲"] = ["↲"], ["≤"] = ["≤"], ["≦"] = ["≦"], ["⥡"] = ["⥡"], ["⥙"] = ["⥙"], ["⥎"] = ["⥎"], ["⥚"] = ["⥚"], ["⥑"] = ["⥑"], ["⥠"] = ["⥠"], ["⥘"] = ["⥘"], ["⥒"] = ["⥒"], ["⋚"] = ["⋚"], ["⥼"] = ["⥼"], ["⌊"] = ["⌊"], ["≶"] = ["≶"], ["&Lgrave;"] = ["Ì"], ["⥢"] = ["⥢"], ["↽"] = ["↽"], ["↼"] = ["↼"], ["⥪"] = ["⥪"], ["⋘"] = ["⋘"], ["⇇"] = ["⇇"], ["⥫"] = ["⥫"], ["Ŀ"] = ["Ŀ"], ["ŀ"] = ["ŀ"], ["≨"] = ["≨"], ["⋦"] = ["⋦"], ["⇽"] = ["⇽"], ["∗"] = ["∗"], ["_"] = ["_"], ["◊"] = ["◊"], ["("] = ["("], ["⇆"] = ["⇆"], ["⇋"] = ["⇋"], ["⥭"] = ["⥭"], ["‎"] = ["‎"], ["⊿"] = ["⊿"], ["‹"] = ["‹"], ["ℒ"] = ["ℒ"], ["↰"] = ["↰"], ["≲"] = ["≲"], ["["] = ["["], ["‘"] = ["‘"], ["Ł"] = ["Ł"], ["ł"] = ["ł"], ["<"] = ["<"], ["≪"] = ["≪"], ["⋖"] = ["⋖"], ["⋋"] = ["⋋"], ["⋉"] = ["⋉"], ["⥶"] = ["⥶"], ["⊴"] = ["⊴"], ["&Luml;"] = ["Ï"], ["⥊"] = ["⥊"], ["⥦"] = ["⥦"], ["¯"] = ["¯"], ["♂"] = ["♂"], ["✠"] = ["✠"], ["⤅"] = ["⤅"], ["↧"] = ["↧"], ["↤"] = ["↤"], ["&mapstoright;"] = ["↦"], ["↥"] = ["↥"], ["—"] = ["—"], ["∺"] = ["∺"], ["℧"] = ["℧"], ["µ"] = ["µ"], ["∣"] = ["∣"], ["·"] = ["·"], ["−"] = ["-"], ["−"] = ["−"], ["⊟"] = ["⊟"], ["∸"] = ["∸"], ["∓"] = ["∓"], ["⊧"] = ["⊧"], ["ℳ"] = ["ℳ"], ["Μ"] = ["Μ"], ["μ"] = ["μ"], ["⊸"] = ["⊸"], ["∇"] = ["∇"], ["Ń"] = ["Ń"], ["ń"] = ["ń"], ["≉"] = ["≉"], ["ʼn"] = ["ʼn"], ["♮"] = ["♮"], [" "] = [" "], ["Ň"] = ["Ň"], ["ň"] = ["ň"], ["Ņ"] = ["Ņ"], ["ņ"] = ["ņ"], ["≇"] = ["≇"], ["–"] = ["–"], ["≠"] = ["≠"], ["⤤"] = ["⤤"], ["↗"] = ["↗"], ["⇗"] = ["⇗"], ["≢"] = ["≢"], ["⤨"] = ["⤨"], ["∄"] = ["∄"], ["≱"] = ["≱"], ["≵"] = ["≵"], ["≯"] = ["≯"], ["↮"] = ["↮"], ["⇎"] = ["⇎"], ["∋"] = ["∋"], ["∋"] = ["∗"], ["⋼"] = ["⋼"], ["⋺"] = ["⋺"], ["↚"] = ["↚"], ["⇍"] = ["⇍"], ["‥"] = ["‥"], ["≰"] = ["≰"], ["≴"] = ["≴"], ["≮"] = ["≮"], ["⋪"] = ["⋪"], ["⋬"] = ["⋬"], ["∤"] = ["∤"], ["ℕ"] = ["ℕ"], ["¬"] = ["¬"], ["≭"] = ["≭"], ["∉"] = ["∉"], ["⋷"] = ["⋷"], ["⋶"] = ["⋶"], ["∌"] = ["∌"], ["⋾"] = ["⋾"], ["⋽"] = ["⋽"], ["∦"] = ["∦"], ["⊀"] = ["⊀"], ["⋠"] = ["⋠"], ["↛"] = ["↛"], ["⇏"] = ["⇏"], ["⋫"] = ["⋫"], ["⋭"] = ["⋭"], ["⊁"] = ["⊁"], ["⋡"] = ["⋡"], ["≁"] = ["≁"], ["≄"] = ["≄"], ["⋢"] = ["⋢"], ["⋣"] = ["⋣"], ["⊄"] = ["⊄"], ["⊈"] = ["⊈"], ["⊅"] = ["⊅"], ["⊉"] = ["⊉"], ["≹"] = ["≹"], ["Ñ"] = ["Ñ"], ["ñ"] = ["ñ"], ["≸"] = ["≸"], ["Ν"] = ["Ν"], ["ν"] = ["ν"], ["#"] = ["#"], ["№"] = ["№"], ["⊬"] = ["⊬"], ["⊭"] = ["⊭"], ["⊮"] = ["⊮"], ["⊯"] = ["⊯"], ["⤄"] = ["⤄"], ["⤂"] = ["⤂"], ["⤃"] = ["⤃"], ["⤣"] = ["⤣"], ["↖"] = ["↖"], ["⇖"] = ["⇖"], ["⤧"] = ["⤧"], ["Ó"] = ["Ó"], ["ó"] = ["ó"], ["⊛"] = ["⊛"], ["⊚"] = ["⊚"], ["Ô"] = ["Ô"], ["ô"] = ["ô"], ["⊝"] = ["⊝"], ["Ő"] = ["Ő"], ["ő"] = ["ő"], ["⊙"] = ["⊙"], ["Œ"] = ["Œ"], ["œ"] = ["œ"], ["Ò"] = ["Ò"], ["ò"] = ["ò"], ["↺"] = ["↺"], ["‾"] = ["‾"], ["Ō"] = ["Ō"], ["ō"] = ["ō"], ["Ω"] = ["Ω"], ["ω"] = ["ω"], ["Ο"] = ["Ο"], ["ο"] = ["ο"], ["⊖"] = ["⊖"], ["⊕"] = ["⊕"], ["∨"] = ["∨"], ["↻"] = ["↻"], ["ª"] = ["ª"], ["º"] = ["º"], ["⊶"] = ["⊶"], ["ℴ"] = ["ℴ"], ["Ø"] = ["Ø"], ["ø"] = ["ø"], ["⊘"] = ["⊘"], ["Õ"] = ["Õ"], ["õ"] = ["õ"], ["⊗"] = ["⊗"], ["Ö"] = ["Ö"], ["ö"] = ["ö"], ["¶"] = ["¶"], ["∥"] = ["∥"], ["∂"] = ["∂"], ["%"] = ["%"], ["."] = ["."], ["‰"] = ["‰"], ["‰"] = ["‰"], ["⊥"] = ["⊥"], ["‱"] = ["‱"], ["Φ"] = ["Φ"], ["φ"] = ["φ"], ["☎"] = ["☎"], ["Π"] = ["Π"], ["π"] = ["π"], ["ϖ"] = ["ϖ"], ["ℏ"] = ["ℏ"], ["ℎ"] = ["ℎ"], ["+"] = ["+"], ["⊞"] = ["⊞"], ["∔"] = ["∔"], ["±"] = ["±"], ["ℙ"] = ["ℙ"], ["£"] = ["£"], ["≺"] = ["≺"], ["≼"] = ["≼"], ["′"] = ["′"], ["″"] = ["″"], ["⋨"] = ["⋨"], ["∏"] = ["∏"], ["∝"] = ["∝"], ["≾"] = ["≾"], ["⊰"] = ["⊰"], ["Ψ"] = ["Ψ"], ["ψ"] = ["ψ"], ["ℚ"] = ["ℚ"], ["⁗"] = ["⁗"], ["?"] = ["?"], ["""] = ["""], ["⇛"] = ["⇛"], ["Ŕ"] = ["Ŕ"], ["ŕ"] = ["ŕ"], ["√"] = ["√"], ["⟩"] = ["〉"], ["»"] = ["»"], ["→"] = ["→"], ["↠"] = ["↠"], ["⇒"] = ["⇒"], ["⥵"] = ["⥵"], ["⇥"] = ["⇥"], ["⤠"] = ["⤠"], ["⤳"] = ["⤳"], ["⤞"] = ["⤞"], ["↪"] = ["↪"], ["↬"] = ["↬"], ["⥅"] = ["⥅"], ["⥴"] = ["⥴"], ["⤖"] = ["⤖"], ["↣"] = ["↣"], ["↝"] = ["↝"], ["⤚"] = ["⤚"], ["⤜"] = ["⤜"], ["∶"] = ["∶"], ["⤍"] = ["⤍"], ["⤏"] = ["⤏"], ["⤐"] = ["⤐"], ["❳"] = ["❳"], ["}"] = ["}"], ["]"] = ["]"], ["Ř"] = ["Ř"], ["ř"] = ["ř"], ["Ŗ"] = ["Ŗ"], ["ŗ"] = ["ŗ"], ["⌉"] = ["⌉"], ["}"] = ["}"], ["⤷"] = ["⤷"], ["⥩"] = ["⥩"], ["”"] = ["”"], ["↳"] = ["↳"], ["ℜ"] = ["ℜ"], ["®"] = ["®"], ["⥽"] = ["⥽"], ["⌋"] = ["⌋"], ["⥤"] = ["⥤"], ["⇁"] = ["⇁"], ["⇀"] = ["⇀"], ["⥬"] = ["⥬"], ["Ρ"] = ["Ρ"], ["ρ"] = ["ρ"], ["⥝"] = ["⥝"], ["⥕"] = ["⥕"], ["⥛"] = ["⥛"], ["⥏"] = ["⥏"], ["⥜"] = ["⥜"], ["⥔"] = ["⥔"], ["⥓"] = ["⥓"], ["⇄"] = ["⇄"], ["⇌"] = ["⇌"], ["‏"] = ["‏"], ["⇾"] = ["⇾"], ["ℝ"] = ["ℝ"], ["⥰"] = ["⥰"], [")"] = [")"], ["⇉"] = ["⇉"], ["›"] = ["›"], ["ℛ"] = ["ℛ"], ["↱"] = ["↱"], ["]"] = ["]"], ["’"] = ["’"], ["⋌"] = ["⋌"], ["⋊"] = ["⋊"], ["⊵"] = ["⊵"], ["⥨"] = ["⥨"], ["℞"] = ["℞"], ["Ś"] = ["Ś"], ["ś"] = ["ś"], ["‚"] = ["‚"], ["≻"] = ["≻"], ["Š"] = ["Š"], ["š"] = ["š"], ["≽"] = ["≽"], ["Ş"] = ["Ş"], ["ş"] = ["ş"], ["Ŝ"] = ["Ŝ"], ["ŝ"] = ["ŝ"], ["⋩"] = ["⋩"], ["≿"] = ["≿"], ["⋅"] = ["⋅"], ["⊡"] = ["⊡"], ["⤥"] = ["⤥"], ["↘"] = ["↘"], ["⇘"] = ["⇘"], ["§"] = ["§"], [";"] = [";"], ["⤩"] = ["⤩"], ["∖"] = ["∖"], ["✶"] = ["✶"], ["♯"] = ["♯"], ["­"] = ["­"], ["Σ"] = ["Σ"], ["σ"] = ["σ"], ["ς"] = ["ς"], ["∼"] = ["∼"], ["≃"] = ["≃"], ["≆"] = ["≆"], ["⥲"] = ["⥲"], ["/"] = ["/"], ["♠"] = ["♠"], ["⊓"] = ["⊓"], ["⊔"] = ["⊔"], ["⊏"] = ["⊏"], ["⊑"] = ["⊑"], ["⊐"] = ["⊐"], ["⊒"] = ["⊒"], ["⋆"] = ["⋆"], ["☆"] = ["☆"], ["★"] = ["★"], ["ϵ"] = ["ϵ"], ["ϕ"] = ["ϕ"], ["⊂"] = ["⊂"], ["⋐"] = ["⋐"], ["⊆"] = ["⊆"], ["⊊"] = ["⊊"], ["⥹"] = ["⥹"], ["∑"] = ["∑"], ["♪"] = ["♪"], ["¹"] = ["¹"], ["²"] = ["²"], ["³"] = ["³"], ["⊃"] = ["⊃"], ["⋑"] = ["⋑"], ["⊇"] = ["⊇"], ["⥻"] = ["⥻"], ["⊋"] = ["⊋"], ["⤦"] = ["⤦"], ["↙"] = ["↙"], ["⇙"] = ["⇙"], ["⤪"] = ["⤪"], ["ß"] = ["ß"], ["Τ"] = ["Τ"], ["τ"] = ["τ"], ["Ť"] = ["Ť"], ["ť"] = ["ť"], ["Ţ"] = ["Ţ"], ["ţ"] = ["ţ"], ["∴"] = ["∴"], ["Θ"] = ["Θ"], ["θ"] = ["θ"], ["ϑ"] = ["ϑ"], [" "] = [" "], ["Þ"] = ["Þ"], ["þ"] = ["þ"], ["˜"] = ["~"], ["×"] = ["×"], ["⊠"] = ["⊠"], ["⊤"] = ["⊤"], ["‴"] = ["‴"], ["™"] = ["™"], ["≜"] = ["≜"], ["Ŧ"] = ["Ŧ"], ["ŧ"] = ["ŧ"], ["Ú"] = ["Ú"], ["ú"] = ["ú"], ["↑"] = ["↑"], ["↟"] = ["↟"], ["⇑"] = ["⇑"], ["⥉"] = ["⥉"], ["Ŭ"] = ["Ŭ"], ["ŭ"] = ["ŭ"], ["Û"] = ["Û"], ["û"] = ["û"], ["⇅"] = ["⇅"], ["Ű"] = ["Ű"], ["ű"] = ["ű"], ["⥮"] = ["⥮"], ["⥾"] = ["⥾"], ["Ù"] = ["Ù"], ["ù"] = ["ù"], ["⥣"] = ["⥣"], ["↿"] = ["↿"], ["↾"] = ["↾"], ["Ū"] = ["Ū"], ["ū"] = ["ū"], ["¨"] = ["¨"], ["Ų"] = ["Ų"], ["ų"] = ["ų"], ["⤒"] = ["⤒"], ["⊎"] = ["⊎"], ["ϒ"] = ["ϒ"], ["Υ"] = ["Υ"], ["υ"] = ["υ"], ["Ů"] = ["Ů"], ["ů"] = ["ů"], ["⋰"] = ["⋰"], ["Ũ"] = ["Ũ"], ["ũ"] = ["ũ"], ["⇈"] = ["⇈"], ["Ü"] = ["Ü"], ["ü"] = ["ü"], ["ϰ"] = ["ϰ"], ["↕"] = ["↕"], ["⇕"] = ["⇕"], ["ϱ"] = ["ϱ"], ["⊢"] = ["⊢"], ["⊨"] = ["⊨"], ["⊩"] = ["⊩"], ["⊫"] = ["⊫"], ["⊻"] = ["⊻"], ["≚"] = ["≚"], ["⋮"] = ["⋮"], ["|"] = ["|"], ["|"] = ["|"], ["‖"] = ["‖"], ["❘"] = ["❘"], ["⊲"] = ["⊲"], ["⊳"] = ["⊳"], ["⊪"] = ["⊪"], ["Ŵ"] = ["Ŵ"], ["ŵ"] = ["ŵ"], ["≙"] = ["≙"], ["℘"] = ["℘"], ["≀"] = ["≀"], ["⋂"] = ["⋂"], ["⋃"] = ["⋃"], ["⟷"] = ["⟷"], ["⟺"] = ["⟺"], ["Ξ"] = ["Ξ"], ["ξ"] = ["ξ"], ["⟵"] = ["⟵"], ["⟸"] = ["⟸"], ["⟼"] = ["⟼"], ["⋻"] = ["⋻"], ["⟶"] = ["⟶"], ["⟹"] = ["⟹"], ["⋁"] = ["⋁"], ["⋀"] = ["⋀"], ["Ý"] = ["Ý"], ["ý"] = ["ý"], ["Ŷ"] = ["Ŷ"], ["ŷ"] = ["ŷ"], ["¥"] = ["¥"], ["ÿ"] = ["ÿ"], ["Ÿ"] = ["Ÿ"], ["Ź"] = ["Ź"], ["ź"] = ["ź"], ["Ž"] = ["Ž"], ["ž"] = ["ž"], ["Ż"] = ["Ż"], ["ż"] = ["ż"], ["Ζ"] = ["Ζ"], ["ζ"] = ["ζ"], ["ℨ"] = ["ℨ"], ["&ziglarr;"] = ["⇜"], ["⇝"] = ["⇝"], ["ℤ"] = ["ℤ"], ["‍"] = ["‍"], ["‌"] = ["‌"] }
local function EntitiesToUTF8(dec) -- https://stackoverflow.com/questions/18694131/how-to-convert-utf8-byte-arrays... local bytemarkers = {{0x7FF, 192}, {0xFFFF, 224}, {0x1FFFFF, 240}} if dec < 128 then return string.char(dec) end local cbs = {} for bytes, vals in ipairs(bytemarkers) do if dec <= vals[1] then for b = bytes + 1, 2, -1 do local mod = dec % 64 dec = (dec - mod) / 64 cbs[b] = string.char(128 + mod) end cbs[1] = string.char(vals[2] + dec) break end end return table.concat(cbs) end
local sres, ssel, stmp
ssel = geany.selection() if (ssel == nil) or (ssel == "") then geany.message("HTML entity to symbol", "Nothing is selected!") return else if (string.sub(ssel, 1, 1) ~= "&") and (string.sub(ssel, -1, -1) ~= ";") then geany.message("HTML entity to symbol", "Selected text does not look like a HTML entity.") return end end
if ssel == "
" then geany.selection("\n") return end
stmp = aentities[ssel] if stmp == nil then stmp = ssel end if string.sub(stmp, 1, 3) == "&#x" then sres = EntitiesToUTF8(tonumber(string.sub(stmp, 4, -2), 16)) else if string.sub(stmp, 1, 2) == "&#" then sres = EntitiesToUTF8(tonumber(string.sub(stmp, 3, -2), 10)) else return end end if sres ~= ssel then geany.selection(sres) end
Documentation: see here https://github.com/geany/geany-plugins/tree/master/geanylua/docs, here |/usr/share/doc/geany-plugin-lua| or here |C:\Program Files\Geany\share\doc\geany-plugins\geanylua|.
— Reply to this email directly, view it on GitHub https://github.com/geany/geany-plugins/issues/1250#issuecomment-1567132475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODNXOSDVQGUKIPLAIUWLLXISO4TANCNFSM6AAAAAAYAYASQE. You are receiving this because you authored the thread.Message ID: ***@***.***>
I created the directory ~/.geany/plugins/geanylua and copied the file to that directory. However, I do not find the selection Tools->Lua Scripts after restarting the editor. By the way, I am running geany 1.37, the latest version available for CentOS 7.
Is there anything more I need to do to activate the menu selection and the lua script?
To ask the obvious question, did you enable the geanylua plugin?
On 05/29/2023 08:34 PM, elextr wrote:
To ask the obvious question, did you enable the geanylua plugin?
— Reply to this email directly, view it on GitHub https://github.com/geany/geany-plugins/issues/1250#issuecomment-1567622814, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODNXPLGJODYSUQUNILBUTXIU6BHANCNFSM6AAAAAAYAYASQE. You are receiving this because you authored the thread.Message ID: ***@***.***>
No and the Geany Plugin Manager does not list in my installation. I searched for it but have not found it for the version of Geany I am running, 1.37. Is it available for my version?
Is it available for my version?
Depends on your distro, the Geany project does not make distro packages. The distros decide what version of Lua it has available, and if all the other dependencies are available on that distro to build plugins.
On 05/29/2023 09:57 PM, elextr wrote:
Is it available for my version?
Depends on your distro, the Geany project does not make distro packages. The distros decide what version of Lua it has available, and if all the other dependencies are available on that distro to build plugins.
— Reply to this email directly, view it on GitHub https://github.com/geany/geany-plugins/issues/1250#issuecomment-1567662682, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODNXM7B6TU6OI5QWP4XA3XIVHXVANCNFSM6AAAAAAYAYASQE. You are receiving this because you authored the thread.Message ID: ***@***.***>
I downloaded the source file for the plugins from the geany website and compiled the plugins. The geanylua plugin did not build, nor did a bunch of others. The output did not give the reason why some failed.
The output did not give the reason why some failed.
Autotools is _such_ a helpful build tool. [end obligatory autotools hate]
Anyway look at the output of configure, any plugin that didn't configure (no in the summary at the end) probably does not have the __development__ files for the dependency installed. (Many distros separate the runtime packages and the development packages needed to build software using that package, don't know about centos).
The dependency checks for Geanylua are [here](https://github.com/geany/geany-plugins/blob/master/build/geanylua.m4). I don't read m4 (who does?) but it looks like Lua5.1 and gmodule are all that are checked.
BTW you don't need to build all the plugins, `--disable-all-plugins --enable-geanylua` on configure should only do Geanylua and will fail if dependencies are not met.
On 05/29/2023 10:42 PM, elextr wrote:
BTW you don't need to build all the plugins, |--disable-all-plugins --enable-geanylua| on configure should only do Geanylua and will fail if dependencies are not met.
— Reply to this email directly, view it on GitHub https://github.com/geany/geany-plugins/issues/1250#issuecomment-1567687030, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODNXO2LPZWWPN4TKEZO6LXIVNC3ANCNFSM6AAAAAAYAYASQE. You are receiving this because you authored the thread.Message ID: ***@***.***>
Yes, I found those instructions and tried to build just geanylua. The error messages seem a bit ambiguous:
checking whether the GTK version in use is compatible with plugin devhelp... no checking for gtk+-3.0 >= 2.12 glib-2.0 >= 2.14 gio-2.0 >= 2.18 ctpl >= 0.3... no checking for rst2html... /usr/bin/rst2html checking for lua5.1 >= 5.1 lua5.1 < 5.2... no configure: error: Package requirements (lua5.1 >= 5.1 lua5.1 < 5.2) were not met:
The error seems to be that while I have lua 5.1.4 installed on my system (I checked the version), geanylua fails on the lua version. Reading the last part above, however, does not explain why my lua 5.1.4 will not work since the requirement seems to be lua >= 5.1...
The centos Lua [package](https://centos.pkgs.org/7/centos-x86_64/lua-5.1.4-15.el7.x86_64.rpm.html) does not include the files [included](https://github.com/geany/geany-plugins/blob/5b8bf656d90260779eb98933c0489c77...) by Geanylua. As I said above you need the __development__ package https://centos.pkgs.org/7/centos-x86_64/lua-devel-5.1.4-15.el7.x86_64.rpm.ht... which has those files.
@hg2581, how did you install Geany? Just `sudo yum install geany`? In this case try to run: ``` sudo yum update sudo yum install geany-plugins-geanylua ```
P.S. Finding packages for Fedora or CentOS is... hm... some kind of magic and a bad erotic dream.
Finding packages for Fedora or CentOS is... hm... some kind of magic and a bad erotic dream.
Astonishingly google worked for me :confused: to find the links above.
Sorry, to generate the final `aentities` table from the list of entities, I wrote a script, but made a ridiculous mistake in it. The script in my comment has been updated.
@elextr the package search for Debian or Arch Linux is more friendly and each page contains all the necessary information and links. I do not insist, but I have always been annoyed by the search for packages for daughter RHEL distributions :)
the package search for Debian or Arch Linux is more friendly and each page contains all the necessary information and links. I do not insist, but I have always been annoyed by the search for packages for daughter RHEL distributions :)
I totally agree, thats why the confused emoji when google worked.
github-comments@lists.geany.org