<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.xmltv.org/index.php?action=history&amp;feed=atom&amp;title=User%3AWillerZ</id>
		<title>User:WillerZ - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.xmltv.org/index.php?action=history&amp;feed=atom&amp;title=User%3AWillerZ"/>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;action=history"/>
		<updated>2026-09-25T18:46:28Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.4</generator>

	<entry>
		<id>https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1710&amp;oldid=prev</id>
		<title>Dekarl: /* utf8fix */ prepare for grabber articles</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1710&amp;oldid=prev"/>
				<updated>2010-09-02T16:56:59Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;utf8fix: &lt;/span&gt; prepare for grabber articles&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:56, 2 September 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==utf8fix==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==utf8fix==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a program to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl.&amp;#160; I use it because {{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;manpage&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tv_grab_uk_rt|1&lt;/del&gt;}} often results in invalid utf-8 characters in the descriptions of shows (probably a problem with the source data).&amp;#160; Save as utf8fix.c then type 'make utf8fix'.&amp;#160; Once built, 'utf8fix &amp;lt;filename&amp;gt;' will replace invalid characters in &amp;lt;filename&amp;gt; in-place.&amp;#160; It only deals with some classes of invalid character.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a program to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl.&amp;#160; I use it because {{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;grabber&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;uk_rt&lt;/ins&gt;}} often results in invalid utf-8 characters in the descriptions of shows (probably a problem with the source data).&amp;#160; Save as utf8fix.c then type 'make utf8fix'.&amp;#160; Once built, 'utf8fix &amp;lt;filename&amp;gt;' will replace invalid characters in &amp;lt;filename&amp;gt; in-place.&amp;#160; It only deals with some classes of invalid character.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dekarl</name></author>	</entry>

	<entry>
		<id>https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1696&amp;oldid=prev</id>
		<title>Dekarl: link to manpage</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1696&amp;oldid=prev"/>
				<updated>2010-09-02T14:50:22Z</updated>
		
		<summary type="html">&lt;p&gt;link to manpage&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:50, 2 September 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==utf8fix==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==utf8fix==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a program to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl.&amp;#160; I use it because tv_grab_uk_rt often results in invalid utf-8 characters in the descriptions of shows (probably a problem with the source data).&amp;#160; Save as utf8fix.c then type 'make utf8fix'.&amp;#160; Once built, 'utf8fix &amp;lt;filename&amp;gt;' will replace invalid characters in &amp;lt;filename&amp;gt; in-place.&amp;#160; It only deals with some classes of invalid character.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a program to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl.&amp;#160; I use it because &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{manpage|&lt;/ins&gt;tv_grab_uk_rt&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|1}} &lt;/ins&gt;often results in invalid utf-8 characters in the descriptions of shows (probably a problem with the source data).&amp;#160; Save as utf8fix.c then type 'make utf8fix'.&amp;#160; Once built, 'utf8fix &amp;lt;filename&amp;gt;' will replace invalid characters in &amp;lt;filename&amp;gt; in-place.&amp;#160; It only deals with some classes of invalid character.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dekarl</name></author>	</entry>

	<entry>
		<id>https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1683&amp;oldid=prev</id>
		<title>Dekarl: WillerZ moved to User:WillerZ: move user page to user namespace</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1683&amp;oldid=prev"/>
				<updated>2010-09-01T14:02:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php/WillerZ&quot; class=&quot;mw-redirect&quot; title=&quot;WillerZ&quot;&gt;WillerZ&lt;/a&gt; moved to &lt;a href=&quot;/index.php/User:WillerZ&quot; title=&quot;User:WillerZ&quot;&gt;User:WillerZ&lt;/a&gt;: move user page to user namespace&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:02, 1 September 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&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>Dekarl</name></author>	</entry>

	<entry>
		<id>https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1524&amp;oldid=prev</id>
		<title>WillerZ at 07:10, 14 April 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1524&amp;oldid=prev"/>
				<updated>2009-04-14T07:10:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:10, 14 April 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=WillerZ=&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Welcome to my user page!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Welcome to my user page!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Program &lt;/del&gt;to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==utf8fix==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;This is a program &lt;/ins&gt;to replace invalid UTF-8 characters with ? characters.&amp;#160; Sorry it's in C and not Perl&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&amp;#160; I use it because tv_grab_uk_rt often results in invalid utf-8 characters in the descriptions of shows (probably a problem with the source data).&amp;#160; Save as utf8fix.c then type 'make utf8fix'.&amp;#160; Once built, 'utf8fix &amp;lt;filename&amp;gt;' will replace invalid characters in &amp;lt;filename&amp;gt; in-place.&amp;#160; It only deals with some classes of invalid character.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WillerZ</name></author>	</entry>

	<entry>
		<id>https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1523&amp;oldid=prev</id>
		<title>WillerZ at 07:07, 14 April 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmltv.org/index.php?title=User:WillerZ&amp;diff=1523&amp;oldid=prev"/>
				<updated>2009-04-14T07:07:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=WillerZ=&lt;br /&gt;
&lt;br /&gt;
Welcome to my user page!&lt;br /&gt;
&lt;br /&gt;
Program to replace invalid UTF-8 characters with ? characters.  Sorry it's in C and not Perl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/mman.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;inttypes.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  int fd;&lt;br /&gt;
  char *text;&lt;br /&gt;
  struct stat stats;&lt;br /&gt;
  off_t idx;&lt;br /&gt;
  unsigned charbytes,expectbytes;&lt;br /&gt;
  size_t lengths[6] = {};&lt;br /&gt;
  &lt;br /&gt;
  (void)argc;&lt;br /&gt;
  (void)argv;&lt;br /&gt;
   &lt;br /&gt;
  fd = open(argv[1], O_RDWR | O_NOCTTY);&lt;br /&gt;
  if (fd &amp;lt; 0)&lt;br /&gt;
    exit(EXIT_FAILURE);&lt;br /&gt;
&lt;br /&gt;
  if (fstat(fd, &amp;amp;stats))&lt;br /&gt;
    exit(EXIT_FAILURE);&lt;br /&gt;
&lt;br /&gt;
  text = mmap( NULL&lt;br /&gt;
             , stats.st_size&lt;br /&gt;
             , PROT_READ | PROT_WRITE&lt;br /&gt;
             , MAP_SHARED&lt;br /&gt;
             , fd&lt;br /&gt;
             , 0&lt;br /&gt;
             );&lt;br /&gt;
  if (text == MAP_FAILED)&lt;br /&gt;
    exit(EXIT_FAILURE);&lt;br /&gt;
&lt;br /&gt;
  close(fd);&lt;br /&gt;
&lt;br /&gt;
  charbytes = 0;&lt;br /&gt;
  expectbytes = 0;&lt;br /&gt;
&lt;br /&gt;
#define newchar                                                                \&lt;br /&gt;
  do {                                                                         \&lt;br /&gt;
    if (charbytes != expectbytes)                                              \&lt;br /&gt;
    {                                                                          \&lt;br /&gt;
      memset(&amp;amp;text[idx - charbytes],'?',charbytes);                            \&lt;br /&gt;
      ++lengths[0];                                                            \&lt;br /&gt;
    }                                                                          \&lt;br /&gt;
    else                                                                       \&lt;br /&gt;
      ++lengths[expectbytes];                                                  \&lt;br /&gt;
    charbytes = 0;                                                             \&lt;br /&gt;
  } while (0)&lt;br /&gt;
  for (idx = 0; idx &amp;lt; stats.st_size; ++idx)&lt;br /&gt;
  {&lt;br /&gt;
    if ((text[idx] &amp;amp; 0x80) == 0x00)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 1;&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xC0) == 0x80)&lt;br /&gt;
    {&lt;br /&gt;
      /* continuation character */&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xE0) == 0xC0)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 2;&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xF0) == 0xE0)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 3;&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xF8) == 0xF0)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 4;&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xFC) == 0xF8)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 5;&lt;br /&gt;
    }&lt;br /&gt;
    else if ((text[idx] &amp;amp; 0xFE) == 0xFC)&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 6;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
      newchar;&lt;br /&gt;
      expectbytes = 0;&lt;br /&gt;
    }&lt;br /&gt;
    ++charbytes;&lt;br /&gt;
  }&lt;br /&gt;
  newchar;&lt;br /&gt;
  munmap(text, stats.st_size);&lt;br /&gt;
  --lengths[0];&lt;br /&gt;
  fprintf( stderr&lt;br /&gt;
         , &amp;quot;Statistics:\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Single-byte characters: %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Two-byte characters:    %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Three-byte characters:  %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Four-byte characters:   %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Five-byte characters:   %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Six-byte characters:    %8zu\n&amp;quot;&lt;br /&gt;
           &amp;quot;  Invalid characters:     %8zu\n&amp;quot;&lt;br /&gt;
         , lengths[1]&lt;br /&gt;
         , lengths[2]&lt;br /&gt;
         , lengths[3]&lt;br /&gt;
         , lengths[4]&lt;br /&gt;
         , lengths[5]&lt;br /&gt;
         , lengths[6]&lt;br /&gt;
         , lengths[0]&lt;br /&gt;
         );&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>WillerZ</name></author>	</entry>

	</feed>