<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert_character_width</id>
	<title>Module:Convert character width - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert_character_width"/>
	<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Convert_character_width&amp;action=history"/>
	<updated>2026-05-05T02:16:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://salisford.net/index.php?title=Module:Convert_character_width&amp;diff=766&amp;oldid=prev</id>
		<title>Cascadia: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Convert_character_width&amp;diff=766&amp;oldid=prev"/>
		<updated>2023-04-05T14:39:38Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:39, 5 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cascadia</name></author>
	</entry>
	<entry>
		<id>https://salisford.net/index.php?title=Module:Convert_character_width&amp;diff=765&amp;oldid=prev</id>
		<title>wp&gt;MusikBot II: Changed protection settings for &quot;Module:Convert character width&quot;: High-risk template or module: 2783 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require administrator access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Convert_character_width&amp;diff=765&amp;oldid=prev"/>
		<updated>2021-10-26T17:25:20Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/index.php?title=Module:Convert_character_width&quot; title=&quot;Module:Convert character width&quot;&gt;Module:Convert character width&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt;: 2783 transclusions (&lt;a href=&quot;/index.php?title=User:MusikBot_II/TemplateProtector&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:MusikBot II/TemplateProtector (page does not exist)&quot;&gt;more info&lt;/a&gt;) ([Edit=Require extended confirmed access] (indefinite) [Move=Require administrator access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module converts support characters from half-width to full-width, and vice versa.&lt;br /&gt;
-- See [[Halfwidth and fullwidth forms]] for an explanation of half- and full-width characters.&lt;br /&gt;
&lt;br /&gt;
-- @todo FIXME: Needs more characters adding, needs support for diacritic marks.&lt;br /&gt;
&lt;br /&gt;
local data = mw.loadData( 'Module:Convert character width/data' )&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Converts one half-width character to one full-width character.&lt;br /&gt;
local function getFull( s )&lt;br /&gt;
    return data[ s ] or s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Converts one full-width character to one half-width character.&lt;br /&gt;
local function getHalf( s )&lt;br /&gt;
    for half, full in pairs( data ) do&lt;br /&gt;
        if s == full then&lt;br /&gt;
            return half&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Converts multiple half-width characters to full-width characters.&lt;br /&gt;
function p.full( frame )&lt;br /&gt;
    local s = type( frame ) == 'table' and frame.args and frame.args[ 1 ] or frame&lt;br /&gt;
    s = type( s ) == 'number' and tostring( s ) or s&lt;br /&gt;
    if type( s ) ~= 'string' then return end&lt;br /&gt;
    return ( mw.ustring.gsub( s, '.', getFull ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Converts multiple full-width characters to half-width characters.&lt;br /&gt;
function p.half( frame )&lt;br /&gt;
    local s = type( frame ) == 'table' and frame.args and frame.args[ 1 ] or frame&lt;br /&gt;
    s = type( s ) == 'number' and tostring( s ) or s&lt;br /&gt;
    if type( s ) ~= 'string' then return end&lt;br /&gt;
    return ( mw.ustring.gsub( s, '.', getHalf ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wp&gt;MusikBot II</name></author>
	</entry>
</feed>