<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACoordinates%2Fkml</id>
	<title>Modul:Coordinates/kml - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACoordinates%2Fkml"/>
	<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Modul:Coordinates/kml&amp;action=history"/>
	<updated>2026-06-01T21:03:57Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Wikipedia (Deutsch) – Lokale Kopie</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki-de.moshellshocker.dns64.de/index.php?title=Modul:Coordinates/kml&amp;diff=2930902&amp;oldid=prev</id>
		<title>imported&gt;PerfektesChaos: 2018-04-02 * If three space separated words from foreign alphabet have been removed, two spaces would remain and the condition did not match.</title>
		<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Modul:Coordinates/kml&amp;diff=2930902&amp;oldid=prev"/>
		<updated>2018-04-02T12:40:22Z</updated>

		<summary type="html">&lt;p&gt;2018-04-02 * If three space separated words from foreign alphabet have been removed, two spaces would remain and the condition did not match.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local coordinates = { suite  = &amp;quot;Coordinates/kml&amp;quot;,&lt;br /&gt;
                      serial = &amp;quot;2018-04-02&amp;quot;,&lt;br /&gt;
                      item   = 50976437 }&lt;br /&gt;
--[=[&lt;br /&gt;
Overcome a limitation in kmlexport in 2018.&lt;br /&gt;
&lt;br /&gt;
There are three functions below which might be copied into an existing&lt;br /&gt;
       [[Module:Coordinates]] ([[d:Q7348344]])&lt;br /&gt;
or this module might be used stand-alone.&lt;br /&gt;
&lt;br /&gt;
In templates it can be used then by&lt;br /&gt;
        {{#invoke:Coordinates|kmlTitle|Some title for geohack}}&lt;br /&gt;
or respectively (as is)&lt;br /&gt;
        {{#invoke:Coordinates/kml|kmlTitle|Some title for geohack}}&lt;br /&gt;
]=]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates.utf8max2bytes = function ( adjust )&lt;br /&gt;
    -- Save characters &amp;gt; 0x7FF by simplification&lt;br /&gt;
    -- Precondition:&lt;br /&gt;
    --     adjust  -- string to be adjusted&lt;br /&gt;
    -- Postcondition:&lt;br /&gt;
    --     returns  string&lt;br /&gt;
    local r = adjust&lt;br /&gt;
    local lucky, translate = pcall( mw.loadData,&lt;br /&gt;
                                    &amp;quot;Module:Sort/utf8max2bytes&amp;quot; )&lt;br /&gt;
    if type( translate ) == &amp;quot;table&amp;quot; then&lt;br /&gt;
        local Sort&lt;br /&gt;
        lucky, Sort = pcall( require, &amp;quot;Module:Sort&amp;quot; )&lt;br /&gt;
        if type( Sort ) == &amp;quot;table&amp;quot; and&lt;br /&gt;
           type( Sort.Sort ) == &amp;quot;function&amp;quot; then&lt;br /&gt;
           Sort = Sort.Sort()&lt;br /&gt;
            if type( Sort ) == &amp;quot;table&amp;quot; and&lt;br /&gt;
               type( Sort.lex ) == &amp;quot;function&amp;quot; then&lt;br /&gt;
                local s = Sort.lex( r, translate )&lt;br /&gt;
                if type( s ) == &amp;quot;string&amp;quot; then&lt;br /&gt;
                    r = s&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end -- coordinates.utf8max2bytes()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates._kmlTitle = function ( adjust )&lt;br /&gt;
    -- Hack kmlexport title as of 2018 UTF-8 limitation&lt;br /&gt;
    -- Precondition:&lt;br /&gt;
    --     adjust  -- string to be adjusted&lt;br /&gt;
    -- Postcondition:&lt;br /&gt;
    --     returns  string&lt;br /&gt;
    local pattern = mw.ustring.char( 91, 0x0800, 45, 0x7FFFF, 93 )&lt;br /&gt;
    local r = mw.text.decode( adjust, true )&lt;br /&gt;
    r = mw.text.trim( r )&lt;br /&gt;
    if mw.ustring.find( r, pattern ) then&lt;br /&gt;
        r = coordinates.utf8max2bytes( r )&lt;br /&gt;
        r = mw.ustring.gsub( r, pattern, &amp;quot;&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
    if mw.text.trim( r ) == &amp;quot;&amp;quot; then&lt;br /&gt;
        -- fall back to original string if all characters removed&lt;br /&gt;
        r = adjust&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end -- coordinates._kmlTitle()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates.kmlTitle = function ( frame )&lt;br /&gt;
    -- #invoke to adjust kmlexport title&lt;br /&gt;
    local r = frame.args[ 1 ]&lt;br /&gt;
    if r and r ~= &amp;quot;&amp;quot; then&lt;br /&gt;
        r = coordinates._kmlTitle( r )&lt;br /&gt;
    end&lt;br /&gt;
    return r or &amp;quot;&amp;quot;&lt;br /&gt;
end -- coordinates.kmlTitle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return coordinates&lt;/div&gt;</summary>
		<author><name>imported&gt;PerfektesChaos</name></author>
	</entry>
</feed>