<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/18879" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-09-02T17:13:59-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/18879</id>

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2013-09-02T17:13:59-04:00</updated>

		<published>2013-09-02T17:13:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102012#p102012</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102012#p102012"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102012#p102012"><![CDATA[
coming really late...<br><br>This script seems really usefull, can I post it on <a href="http://blog.eggdrop.fr" class="postlink">http://blog.eggdrop.fr</a> ? A lot of users are borred with the utf-8 troubles.<br><br>@spithash: you seems to bee french-speaking, why aren't you on my forum ? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Sep 02, 2013 5:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-09-02T09:57:40-04:00</updated>

		<published>2013-09-02T09:57:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102010#p102010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102010#p102010"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102010#p102010"><![CDATA[
Well I talked to thommey and he gave me this snapshot which is before the utf change in the source. I tried it and with this script I have utf again and bolding in incith-google. for whoever is interested in fetching it, here it is:<br><br><a href="http://lib.so/eggdrop-1.8.prebytearray.tar.gz" class="postlink">http://lib.so/eggdrop-1.8.prebytearray.tar.gz</a> (<span style="color:red">dead link</span>)<br><br>Enjoy.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Mon Sep 02, 2013 9:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-09-02T08:47:31-04:00</updated>

		<published>2013-09-02T08:47:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102007#p102007</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102007#p102007"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102007#p102007"><![CDATA[
I think that after updating my 1.8 source to <strong class="text-strong">Eggdrop v1.8.0+preinit</strong>, the script stopped working because it now fully supports UTF now. <br><br>Thing is that I needed that script to enable utf because that way I didn't have bolding issues with the <strong class="text-strong">incith-google</strong> script  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Mon Sep 02, 2013 8:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-04-04T09:14:37-04:00</updated>

		<published>2013-04-04T09:14:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101357#p101357</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101357#p101357"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101357#p101357"><![CDATA[
yes you always have to .restart <br><br>Let us wait there's anyone available to help with this issue.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Thu Apr 04, 2013 9:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-02-09T10:21:28-04:00</updated>

		<published>2013-02-09T10:21:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100946#p100946</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100946#p100946"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100946#p100946"><![CDATA[
It seems to be a problem i think. I loaded this tcl for utf-8 support before all my scripts (it works) but if i rehash the utf-8 character is replace by something else<br><br>For example i added ''Ñ'' i used list and it ok yet after rehash i had something like ''Ã&amp;#131;Â&amp;#131;Ã&amp;#130;Â&amp;#131;Ã&amp;#131;Â&amp;#130;Ã&amp;#130;Â&amp;#131;Ã&amp;#131;Â&amp;#131;Ã&amp;#130;Â&amp;#130;Ã&amp;#131;Â&amp;#130;Ã&amp;#130;Â&amp;#131;Ã&amp;#131;Â&amp;#131;Ã&amp;#130;Â&amp;#131;Ã&amp;#131;Â&amp;#130;Ã&amp;#130;Â&amp;#130;Ã&amp;#131;Â&amp;#131;Ã&amp;#130;Â&amp;#130;Ã&amp;#131;Â&amp;#130;Ã&amp;#130;Â&amp;#145;'' and at every rehash that list was getting biger and biger so anyone knows what the problem is?<br><br>Because im thinking more and more to compile an eggdrop using utf-8 instead of using this fix script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sat Feb 09, 2013 10:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-01-11T18:10:45-04:00</updated>

		<published>2013-01-11T18:10:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100569#p100569</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100569#p100569"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100569#p100569"><![CDATA[
Oh I see, thanks for the heads up <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Indeed, it works like a charm <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Fri Jan 11, 2013 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-01-11T11:51:30-04:00</updated>

		<published>2013-01-11T11:51:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100564#p100564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100564#p100564"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100564#p100564"><![CDATA[
He edited his first post, so it's safe to assume he overwrote the previous one. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 11, 2013 11:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-01-11T08:26:24-04:00</updated>

		<published>2013-01-11T08:26:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100562#p100562</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100562#p100562"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100562#p100562"><![CDATA[
That's great news <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Where exactly is the fixed version of it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Fri Jan 11, 2013 8:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-01-06T20:02:17-04:00</updated>

		<published>2013-01-06T20:02:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100552#p100552</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100552#p100552"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100552#p100552"><![CDATA[
Yeah, sorry about that.<br><br>I changed the script, which should fix that issue.<br><br>Note: you get problems with other scripts that creates tcl commands that are not procs (with TclOO, namespace ensemble, interp alias etc..)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Sun Jan 06, 2013 8:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2012-09-27T11:02:00-04:00</updated>

		<published>2012-09-27T11:02:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100077#p100077</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100077#p100077"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100077#p100077"><![CDATA[
The script works like a charm my friend and I personally thank you for it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The only issue I have with it, is when I rehash the bot, it gives me this error and crashes the bot:<br><div class="codebox"><p>Code: </p><pre><code>[16:10] #spithash# rehashRehashing.[16:10] Rehashing ...[16:10] AllProtection v4.7 successfully unloaded...[16:10] DÃ©sallocation des ressources de Public Quotes System...[16:10] Listening at telnet port 2600 (all).[16:10] Loading language "en" from language/gseen.en.lang...[16:10] Tcl error in file 'eggdrop.conf':[16:10] can't rename to "dcclist_orig": command already exists    while executing"rename $cmd ${cmd}_orig"    (procedure "initUtf8" line 12)    invoked from within"initUtf8"    (file "scripts/utf.tcl" line 53)    invoked from within"source scripts/utf.tcl"    (file "eggdrop.conf" line 1390)[16:10] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)</code></pre></div>It works fine with a <strong class="text-strong">.restart</strong> though <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Thu Sep 27, 2012 11:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-07-13T18:15:30-04:00</updated>

		<published>2012-03-10T11:35:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98995#p98995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98995#p98995"/>
		<title type="html"><![CDATA[UTF-8 fix script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98995#p98995"><![CDATA[
Ok, for people that can't use the utf-8 patch because they can't compile eggdrop (usually on shell providers)<br><div class="codebox"><p>Code: </p><pre><code>####### Copyright Johannes Kuhn &lt;#John @ quakenet&gt;# This fixes the utf-8 issue on an eggdrop without patch.# Feel free to distribute and or use.# No warranty.## Background:## The problem is that eggdrop sometimes treats things as utf-8 strings# And sometimes as simple byte array.# Almost each string is passed to the tcl interp# Witch calls an eggdrop command and this calls again the eggdrop interp.# When eggdrop passes a string to the interp, it calls Tcl_Eval.# Tcl_Eval trats the input string as utf-8# But when a eggdrop command is called, it only uses the lower 8 bit# This leads to data loss.# # # This script converts all data that should be passed to an eggdrop command# to utf-8, so only the lowest 8 bit are used. When Tcl_Eval is called again# it can convert the data back to utf.package require Tcl 8.5encoding system utf-8# Ok, here is a problem:# We need all eggdrop commands.# The good thing is that all the eggdrop commands are in the global namespace.# The difficulty is to disingush between eggdrop commands# And Tcl commands.# To find out if it is a tcl command I just create an other interp, look at the commands there# and skip them# To make sure that this works, source this script as first script.# Otherwise there might be extra commands in the global namespace that we don't know.proc initUtf8 {} {rename initUtf8 {}set i [interp create]set tcmds [interp eval $i {info commands}]interp delete $iset procs [info procs]foreach cmd [info commands] {if {$cmd ni $tcmds &amp;&amp; $cmd ni $procs&amp;&amp; "${cmd}_orig" ni [info commands] &amp;&amp; ![string match *_orig $cmd]} {# Eggdrop command.rename $cmd ${cmd}_originterp alias {} $cmd {} fixutf8 ${cmd}_orig}}}initUtf8proc fixutf8 args {set cmd {}foreach arg $args {lappend cmd [encoding convertto utf-8 $arg]}catch {{*}$cmd} res optdict incr opt -levelreturn -opt $opt $res}</code></pre></div>It requires at least Tcl 8.5 (I can write a version for 8.4) and this script needs to be sourced after all modules you want to load has been loaded and before any other script is loaded.<br><br>It will increase the CPU and memory usage a bit, but better than no utf-8 patch, right?<br><br>PS.: module loading/unloading should not be done at runtime, because new commands are not replaced.<br><br>Ok, fixed some things: Don't replace *_orig commands with *_orig_orig. Should fix the .rehash<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Sat Mar 10, 2012 11:35 am</p><hr />
]]></content>
	</entry>
	</feed>
