Editing
Module:DecodeEncode/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Encode (© → {{mono|1=&copy;}}) <span class="anchor" id="Encode"></span>== :Function <code>encode</code> encodes some entity-named characters into that name (for example: <code>&</code> → <code>&amp;</code>). Regular sentence: :"At >100 °F, & with a "burning" sun above, we walked. ©" In code: :"<code><nowiki>At >100 °F, & with a "burning" sun above, we walked. ©</nowiki></code>" Encode: :<code><nowiki>{{#invoke:decodeEncode|encode|s=At >100 °F, & with a "burning" sun above, we walked. ©|charset=&<>{{!}}°"'&©}}</nowiki></code> :→ :<code><nowiki>At &gt;100 &#176;F, &amp; with a &quot;burning&quot; sun above, we walked. &#169;</nowiki></code><!-- used Special:ExpandTemplate --> :Renders as: :"At >100 °F, & with a "burning" sun above, we walked. ©" ===character set to encode=== Per Lua documentation, only a small set of characters is processed. The characterset can be set (expanded) by using {{para|charset}}. :Example: {{para|charset|<nowiki><>" \'&</nowiki>}} (the default), {{para|charset|<nowiki><>°"'&©{{!}}</nowiki>}}; characters not in the default will be replaced by their decimal entity: <code>©</code> → <code>&#169;</code> <small>(hexadecimal number, not decimal nor named &copy;)</small>
Summary:
Please note that all contributions to IDU Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
IDU Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
To edit this page, please answer the question that appears below (
more info
):
Who is the wiki admin
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information