The charset attribute of script elements
Since the element definition lacked no required attribute I knew of, I took a look into the linked HTML 5 specification. What I found was that there was actually no attribute missing, but one too much: The charset attribute »must not be specified if the src attribute is not present.«
I wondered whether this was a change from HTML 4 / XHTML to HTML 5 and looked into the HTML 4 specification. There it says: »the charset attribute refers to the character encoding of the script designated by the src attribute; it does not concern the content of the SCRIPT element.« That‘s reasonable, since the charset of the document itself is specified by the web server or in a separate meta tag.
In summary, the charset attribute on non-external script elements is unused in HTML 4 and forbidden in HTML 5; hence I removed it from the HTML code DokuWiki outputs.