<?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/13932" />

	<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>2009-09-29T16:52:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[shadrach]]></name></author>
		<updated>2009-09-29T16:52:42-04:00</updated>

		<published>2009-09-29T16:52:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90401#p90401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90401#p90401"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90401#p90401"><![CDATA[
Thank you, I've got it working.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9548">shadrach</a> — Tue Sep 29, 2009 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-09-28T17:11:58-04:00</updated>

		<published>2009-09-28T17:11:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90386#p90386</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90386#p90386"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90386#p90386"><![CDATA[
<blockquote class="uncited"><div>Are you aware that the real problem has never been the messages going in and out but the channel/user names?! I see only multilingual messages, but not any channel name. Or am I just looking close enough?</div></blockquote>You are correct in the regard it isn't that hard to get correct output for utf-8. Depending on how manipulation of the string is done. If any elements within the string are replaced with any strings in any others encodings, these encoding will break the utf-8 represetation sequences. The rest of the string beyond this will be shown as iso8859-1 (meaning each byte is rendered, rather than sequencing them properly).<br><br>Input has always been affected for me. I'm surprised you haven't experienced it yet. This is the same reason you cannot join a utf-8 channel and instead get the incorrect so8859-1 encoding used. The same thing happens when trying to read a users input from within a bind. It seems for utf-8 any type of input fails (by fail, try nesting 2 languages in that utf-8: english and japanese or russian and french. Using just one makes it too easy). There are ways to work-around this, but they will still fail when dealing with accented vowels. The same way eggdrop's output does for some when dealing with accented vowels (most times they use an elaborate string map to fix this condition, see for yourself). Myself, I've noticed that the (Ã / ascii 195) confuses the utf-8 string, and breaks it back to iso8859-1 encoding. This happens when trying to render french accented sentences in utf-8 on an unpatched bot.<br><br>Plus this finally puts to rest those wishing better support for utf-8 within the script. So I felt was worth mentioning ;P<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Sep 28, 2009 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anahel]]></name></author>
		<updated>2009-09-28T16:00:24-04:00</updated>

		<published>2009-09-28T16:00:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90385#p90385</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90385#p90385"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90385#p90385"><![CDATA[
had same problem, it patched only main.h, so i manually edited tcl.h, you need to add <br><div class="codebox"><p>Code: </p><pre><code>encoding = "utf-8"; </code></pre></div>after this:<br><div class="codebox"><p>Code: </p><pre><code>if (encoding == NULL) {     encoding = "iso8859-1";   } </code></pre></div><br>so i should look like that:<br><div class="codebox"><p>Code: </p><pre><code>if (encoding == NULL) {     encoding = "iso8859-1";   } encoding = "utf-8"</code></pre></div><div class="codebox"><p>Code: </p><pre><code></code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10737">Anahel</a> — Mon Sep 28, 2009 4:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[shadrach]]></name></author>
		<updated>2009-09-28T14:04:58-04:00</updated>

		<published>2009-09-28T14:04:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90383#p90383</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90383#p90383"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90383#p90383"><![CDATA[
Trying to patch eggdrop to utf8. Can someone tell me what the problem in the execution is here? <br><div class="codebox"><p>Code: </p><pre><code>[*******@liberty (~/eggdrop1.6.19)]$ patch -p1 &lt; utf8patch.patchHmm...  Looks like a unified diff to me...The text leading up to this was:--------------------------||--- eggdrop1.6.19.original/src/main.h   2006-03-28 04:35:50.000000000 +0200|+++ eggdrop1.6.19.utf8/src/main.h       2008-04-01 20:57:29.000000000 +0200--------------------------Patching file src/main.h using Plan A...Hunk #1 succeeded at 44.Hmm...  The next patch looks like a unified diff to me...The text leading up to this was:--------------------------|diff -ur eggdrop1.6.19.original/src/tcl.c eggdrop1.6.19.utf8/src/tcl.c|--- eggdrop1.6.19.original/src/tcl.c    2006-03-28 04:35:50.000000000 +0200|+++ eggdrop1.6.19.utf8/src/tcl.c        2008-04-01 20:55:48.000000000 +0200--------------------------Patching file src/tcl.c using Plan A...Hunk #1 failed at 650.1 out of 1 hunks failed--saving rejects to src/tcl.c.rejdone[*******@liberty (~/eggdrop1.6.19)]$</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9548">shadrach</a> — Mon Sep 28, 2009 2:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2009-09-28T13:52:31-04:00</updated>

		<published>2009-09-28T13:52:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90381#p90381</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90381#p90381"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90381#p90381"><![CDATA[
Are you aware that the real problem has never been the messages going in and out but the channel/user names?! I see only multilingual messages, but not any channel name. Or am I just looking close enough?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon Sep 28, 2009 1:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-09-28T01:31:54-04:00</updated>

		<published>2009-09-28T01:31:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90372#p90372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90372#p90372"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90372#p90372"><![CDATA[
<blockquote class="uncited"><div>Jep, can confirm that this is working. My eggdrop (1.6.19) is accepting and outputting UTF-8 correctly now, at least if the script that's used supports this.<br>Unfortunately most of the scripts, like the modded version of incith's google tcl by speechless do not since they use own workarounds and thus break it again. (it works semi fine with an unpatched bot and all the workarounds in the script but still not perfect, so using this patch here would be much better)<br><br>So yeah, thanks for the tip there thommey, this sure could be helpful in the future!</div></blockquote>The future is now! Well, at least it is in response to the script mentioned above. Lately some development time has been found and that investment of time has now lead us to where we are today. <a href="http://forum.egghelp.org/viewtopic.php?t=13586&amp;start=489" class="postlink"><strong class="text-strong">See here for details</strong></a>, but suffice it to say that the modded version of incith google I've provided does in fact now fully support this patch method. So I encourage all those using this script and wanting truly multi-language utf-8 compliant script with perfect renderings of every character in both input and output I can now safely suggest you rush to patch your bots. Enjoy <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=8138">speechles</a> — Mon Sep 28, 2009 1:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2008-08-04T11:05:52-04:00</updated>

		<published>2008-08-04T11:05:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84398#p84398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84398#p84398"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84398#p84398"><![CDATA[
I know I am a little late for feedback, but the project was frozen for a little bit, so I was able to confirm it just now.<br><br>And yeah, it also fixed the issue with the bot unable to "listen" to utf-8 channel. I am truely amazed, that such a simple thing can fix such a troublesome issue. The only thing that seems not possible is to enter both the UTF-8 and the ISO-8859-1 name, at least it seems it ignores the ISO one for me.<br><br>PS: I only modified the main.h and skipped the one in the tcl.c. I should mention that I put "export LANG=de_DE.utf8" in the .bashrc, so the locale of the enviroment was already utf-8.<br><blockquote class="uncited"><div>i get these errors... can someone help me please?</div></blockquote>You should be fine, since the important change in the main.h was done without errors. Just make sure that your bot runs on a shell with utf-8 enabled environment.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon Aug 04, 2008 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[moff]]></name></author>
		<updated>2008-07-25T20:31:57-04:00</updated>

		<published>2008-07-25T20:31:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84165#p84165</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84165#p84165"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84165#p84165"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>moff@HAL-9000:~/eggsource/eggdrop1.6.19$ patch -p0 &lt; utf8patch.patchcan't find file to patch at input line 4Perhaps you used the wrong -p or --strip option?The text leading up to this was:--------------------------||--- eggdrop1.6.19.original/src/main.h   2006-03-28 04:35:50.000000000 +0200|+++ eggdrop1.6.19.utf8/src/main.h       2008-04-01 20:57:29.000000000 +0200--------------------------File to patch: moff@HAL-9000:~/eggsource/eggdrop1.6.19$ patch -p1 &lt; utf8patch.patchpatching file src/main.hpatching file src/tcl.cHunk #1 FAILED at 650.1 out of 1 hunk FAILED -- saving rejects to file src/tcl.c.rejmoff@HAL-9000:~/eggsource/eggdrop1.6.19$ </code></pre></div>i get these errors... can someone help me please?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10076">moff</a> — Fri Jul 25, 2008 8:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[moff]]></name></author>
		<updated>2008-07-24T21:26:52-04:00</updated>

		<published>2008-07-24T21:26:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84156#p84156</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84156#p84156"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84156#p84156"><![CDATA[
ok, sry guys im new too this...<br>eggdrop is compiled and runs good, but how do i install the utf-8 patch/hack ?<br><br>thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10076">moff</a> — Thu Jul 24, 2008 9:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MellowB]]></name></author>
		<updated>2008-07-17T14:21:26-04:00</updated>

		<published>2008-07-17T14:21:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84042#p84042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84042#p84042"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84042#p84042"><![CDATA[
Jep, can confirm that this is working. My eggdrop (1.6.19) is accepting and outputting UTF-8 correctly now, at least if the script that's used supports this.<br>Unfortunately most of the scripts, like the modded version of incith's google tcl by speechless do not since they use own workarounds and thus break it again. (it works semi fine with an unpatched bot and all the workarounds in the script but still not perfect, so using this patch here would be much better)<br><br>So yeah, thanks for the tip there thommey, this sure could be helpful in the future!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9652">MellowB</a> — Thu Jul 17, 2008 2:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[thommey]]></name></author>
		<updated>2008-06-16T13:32:32-04:00</updated>

		<published>2008-06-16T13:32:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83573#p83573</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83573#p83573"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83573#p83573"><![CDATA[
De Kus, enforcing the tcl-encoding to be utf-8 is not the important part there, the other one is. And as it seems to work for 2 users now (including me), it's worth a try, isn't it? As incith mentioned, the key is undefining USE_TCL_BYTE_ARRAYS. That's the "clean" solution of making eggdrop use GetStringFromObj instead of GetByteArrayFromObj, what other users already found to be the source of the problem.<br><br><br>PS: Thanks for the feedback <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=9830">thommey</a> — Mon Jun 16, 2008 1:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2008-06-16T13:27:55-04:00</updated>

		<published>2008-06-16T13:27:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83572#p83572</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83572#p83572"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83572#p83572"><![CDATA[
Simply forcing encoding to utf-8 did not fix the output for me.  I had to undef the USE_TCL_BYTE_ARRAYS line.<br><br>This is bizarre since I am on Tcl 8.4.<br><br>Oops, nevermind.  &gt;= 1.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jun 16, 2008 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2008-06-16T12:35:26-04:00</updated>

		<published>2008-06-16T12:35:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83569#p83569</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83569#p83569"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83569#p83569"><![CDATA[
Well, my problem wasn't the UTF-8 output. I didn't test the hack, but since my bots TCL-Encoding is already UTF-8, I am pretty sure it wouldn't change a thing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon Jun 16, 2008 12:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2008-06-16T12:32:15-04:00</updated>

		<published>2008-06-16T12:32:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83568#p83568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83568#p83568"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83568#p83568"><![CDATA[
This works, bot can output utf-8 properly now.  I am posting this rather immediately with no after-testing.  I did a !weather, output still works.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jun 16, 2008 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[thommey]]></name></author>
		<updated>2008-04-01T15:20:48-04:00</updated>

		<published>2008-04-01T15:20:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82111#p82111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82111#p82111"/>
		<title type="html"><![CDATA[Getting eggdrop ready for UTF-8]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82111#p82111"><![CDATA[
Hi,<br><br>interesting topic. I tested this patch and I could bind on utf-8 commands and join utf-8 channels (didn't have much time to test further).<br><br><strong class="text-strong">BE AWARE: This patch FORCES UTF-8 support, so only apply it if your system supports it :) [This patch overrides eggdrops own mechanism to detect the encoding system it should use based on variables (LC_ALL,...). So this is totally a HACK and nothing to put into production code for compatibility reasons]</strong><div class="codebox"><p>Code: </p><pre><code>--- eggdrop1.6.18.original/src/main.h   2006-03-28 04:35:50.000000000 +0200+++ eggdrop1.6.18.utf8/src/main.h       2008-04-01 20:57:29.000000000 +0200@@ -44,7 +44,7 @@ #endif #if (((TCL_MAJOR_VERSION == 8) &amp;&amp; (TCL_MINOR_VERSION &gt;= 1)) || (TCL_MAJOR_VERSION &gt; 8))-#  define USE_TCL_BYTE_ARRAYS+#  undef USE_TCL_BYTE_ARRAYS #  define USE_TCL_ENCODING #endifdiff -ur eggdrop1.6.18.original/src/tcl.c eggdrop1.6.18.utf8/src/tcl.c--- eggdrop1.6.18.original/src/tcl.c    2006-03-28 04:35:50.000000000 +0200+++ eggdrop1.6.18.utf8/src/tcl.c        2008-04-01 20:55:48.000000000 +0200@@ -650,7 +650,7 @@   if (encoding == NULL) {     encoding = "iso8859-1";   }-+  encoding = "utf-8";   Tcl_SetSystemEncoding(NULL, encoding);</code></pre></div>PS: Please tell me if it worked or not :)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9830">thommey</a> — Tue Apr 01, 2008 3:20 pm</p><hr />
]]></content>
	</entry>
	</feed>
