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

	<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>2008-12-28T21:38:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-12-28T21:38:12-04:00</updated>

		<published>2008-12-28T21:38:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86567#p86567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86567#p86567"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86567#p86567"><![CDATA[
<blockquote class="uncited"><div>My solution would likewise work in a TCL script not confined to display within a non UTF-8 environment.</div></blockquote>When eggdrop v1.6.20 is released, eggdrop should become a workable utf-8 environment finally. At that time I'll probably update my irc client, until then... work-around is the name of the game. ^_~<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Dec 28, 2008 9:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2008-12-28T21:31:51-04:00</updated>

		<published>2008-12-28T21:31:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86566#p86566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86566#p86566"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86566#p86566"><![CDATA[
Sorry my mistake.<br><br>The bot's partyline seems incapable of interpreting/displaying UTF-8 characters by default. No amount of encoding seems to change that, as your post confirms.<br><br>My original posts were using a public commands Tclsh and so done through a mIRC bot channel, hence my solution works because mIRC displays UTF-8 by default.<br><br>My solution would likewise work in a TCL script not confined to display within a non UTF-8 environment.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sun Dec 28, 2008 9:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-12-28T21:15:22-04:00</updated>

		<published>2008-12-28T21:15:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86565#p86565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86565#p86565"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86565#p86565"><![CDATA[
<blockquote class="uncited"><div>Works fine for me using partyline Tcl.<br><br>My guess is you are not using a utf-8 compliant IRC client or you are in the bot's partyline via telnet.<br><br>Should work in DCC CHAT within mIRC or XChat (I'm using mIRC) providing they are set to display utf-8 by default.</div></blockquote>Why does it matter what my irc client does? You aren't seeing the bigger picture. What you are trying to regsub, the encoding you set it to, and what you are regsubbing in, it's encoding both matter.<blockquote class="uncited"><div>&lt;speechles&gt; .tcl set mytest [encoding convertto "utf-8" "at xy³ + y² temperature is 14°"]<br>&lt;bot&gt; Tcl: at xyÂ³ + yÂ² temperature is 14Â°<br>&lt;speechles&gt; .tcl set mytest2 [encoding convertto "utf-8" "\[°²³\]"]<br>&lt;sp33chy&gt; Tcl: [Â°Â²Â³]<br>&lt;speechles&gt; .tcl set testing [regsub -all -- "$mytest2" $mytest "\\\\&amp;"] <br>&lt;sp33chy&gt; Tcl: at xy\Â\³ + y\Â\² temperature is 14\Â\°</div></blockquote>This is meant to demonstrate working outside of the bot's internal encoding or system encoding. You can get it to work, you just have to be explicit.<br><br>If you check out the unofficial incith google script, you can see this issue causes problems in several places and has numerous work arounds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Dec 28, 2008 9:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2008-12-28T21:06:57-04:00</updated>

		<published>2008-12-28T21:06:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86564#p86564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86564#p86564"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86564#p86564"><![CDATA[
Works fine for me using partyline Tcl.<br><br>My guess is you are not using a utf-8 compliant IRC client or you are in the bot's partyline via telnet.<br><br>Should work in DCC CHAT within mIRC or XChat (I'm using mIRC) providing they are set to display utf-8 by default.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sun Dec 28, 2008 9:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-12-28T20:52:12-04:00</updated>

		<published>2008-12-28T20:52:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86563#p86563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86563#p86563"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86563#p86563"><![CDATA[
Probably has more to do with encodings, using eggdrop v1.6.17 and tcl 8.4<blockquote class="uncited"><div>&lt;speechles&gt; .tcl set mytest "at xy³ + y² temperature is 14°" <br>&lt;bot&gt; Tcl: at xy? + y? temperature is 14?<br>&lt;speechles&gt; .tcl set testing [regsub -all -- {[°²³]} $mytest "\\\\&amp;"] <br>&lt;bot&gt; Tcl: at xy\? + y\? temperature is 14\?</div></blockquote>This is how it works as iso8859-1, those chars aren't represented correctly they get the question mark treatment. But apparently it has worked because the escapes are properly placed. But if we instead use "utf-8"...<blockquote class="uncited"><div>&lt;speechles&gt; .tcl set mytest [encoding convertto "utf-8" "at xy³ + y² temperature is 14°"]<br>&lt;bot&gt; Tcl: at xyÂ³ + yÂ² temperature is 14Â°<br>&lt;speechles&gt; .tcl set testing [regsub -all -- {[°²³]} $mytest "\\\\&amp;"] <br>&lt;sp33chy&gt; Tcl: at xyÂ³ + yÂ² temperature is 14Â°</div></blockquote>Fails, but I can see them clearly...<br>The work around of course is to use binary/octal/decimal/hex notation when referencing these characters or using the correct encoding to begin with...<br><br>When eggdrop finally supports utf-8, and latin charsets aren't confused with iso8859-1 representations.. Well, at that time all this stuff will probably not need work arounds any longer..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Dec 28, 2008 8:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2008-12-28T19:41:16-04:00</updated>

		<published>2008-12-28T19:41:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86561#p86561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86561#p86561"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86561#p86561"><![CDATA[
Reference my post above, I have since done much reading and muttering under my breath in an attempt to understand the difference between ³ as per a copy/paste from say windows character map and a ³ as generated from the hex notation \xB3. I am non the wiser. Even binary scanning the character shows them to have the same underlying value.<br><br>At least I am 50% happy in that I have a solution. Simply build up the regsub pattern BOTH from an explicit copy/paste of the characters themself AND from their implicit hex equivalents.<br><br>use --&gt; [regsub -all -- {[°²³\xB0\xB2\xB3]} $varname "\\\\&amp;"]<br><br>This is the result when I build up the variable using windows character map for the special characters :-<br><br>% set mytest "at xy³ + y² temperature is 14°"<br>at xy³ + y² temperature is 14°<br>% return [regsub -all -- {[°²³\xB0\xB2\xB3]} $mytest "\\\\&amp;"]<br>at xy\³ + y\² temperature is 14\°<br><br>This is the result when I build up the variable using hex notation for the special characters :-<br><br>% set mytest "at xy\xB3 + y\xB2 temperature is 14\xB0"<br>at xy³ + y² temperature is 14°<br>% return [regsub -all -- {[°²³\xB0\xB2\xB3]} $mytest "\\\\&amp;"]<br>at xy\³ + y\² temperature is 14\°<br><br>Works for both.<br><br>My guess is that this is pretty much the dirty solution the original poster found.<br><br>Please, please, somebody explain what the difference is so that I may sleep peacefully.<br><br>/me wanders off threatening a terrible revenge on all descendants of Charles Babbage.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sun Dec 28, 2008 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2008-12-26T09:37:02-04:00</updated>

		<published>2008-12-26T09:37:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86525#p86525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86525#p86525"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86525#p86525"><![CDATA[
An interesting subject.<br><br>I have long suffered the mystical art of fonts, code pages, encodings and the like.<br><br>Lets say I copy/paste from the character map tool in windows to build up a text string as follows :-<br><br>% set mytest "at xy³ + y² temperature is 14°"<br>at xy³ + y² temperature is 14°<br><br>An attempt to modify (add a backslash to) the special characters using their equivalent hex values and regsub does not work :-<br><br>% return [regsub -all -- {[\xB0\xB2\xB3]} $mytest "\\\\&amp;"]<br>at xy³ + y² temperature is 14°<br><br>It should have worked. It seems clear that copy/paste from windows character map does not result in the expected hex characters in the Tcl interpreter I am using.<br><br>However, if we explicity use hex character notation to build up the exact same text string as follows :-<br><br>% set mytest "at xy\xB3 + y\xB2 temperature is 14\xB0"<br>at xy³ + y² temperature is 14°<br><br>It looks the same, but now using the same regsub statement :-<br><br>% return [regsub -all -- {[\xB0\xB2\xB3]} $mytest "\\\\&amp;"]<br>at xy\³ + y\² temperature is 14\°<br><br>It works!<br><br>If it is any help to the original poster, if you are able to explicitly build up your string using hex notation then that would enable you to use hex notation in the regsub pattern successfully.<br><br>If not, then it remains a mystical art which will eventually result in insanity.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Fri Dec 26, 2008 9:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2008-12-22T14:00:44-04:00</updated>

		<published>2008-12-22T14:00:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86456#p86456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86456#p86456"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86456#p86456"><![CDATA[
<blockquote class="uncited"><div>We found a dirty but working way to fix it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>tnx all for help</div></blockquote>Thank you for posting your solution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Dec 22, 2008 2:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomcat]]></name></author>
		<updated>2008-12-11T17:13:19-04:00</updated>

		<published>2008-12-11T17:13:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86209#p86209</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86209#p86209"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86209#p86209"><![CDATA[
We found a dirty but working way to fix it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>tnx all for help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10355">tomcat</a> — Thu Dec 11, 2008 5:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-11T16:55:09-04:00</updated>

		<published>2008-12-11T16:55:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86208#p86208</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86208#p86208"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86208#p86208"><![CDATA[
damn, I have no problem with this char on my bot<br><br>u can always try to change this char to its code number, and after that u can delete it from whole string or smth :&gt; <br><br>do some trigger and simple IF, !test &lt;special_char&gt; and after in test script if {$arg == "special_char"} { puts "its ok" } <br><br>cause we dont know what is current wrong <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <br>like user wrote, that can be smth with codepage ;]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Thu Dec 11, 2008 4:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomcat]]></name></author>
		<updated>2008-12-11T16:38:48-04:00</updated>

		<published>2008-12-11T16:38:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86206#p86206</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86206#p86206"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86206#p86206"><![CDATA[
I tried iso 8859 the other is not known and  utf-8<br><br>it doesnt matter ² ³ ° still dont get replaced with \² \³ \°<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10355">tomcat</a> — Thu Dec 11, 2008 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-11T16:11:06-04:00</updated>

		<published>2008-12-11T16:11:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86204#p86204</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86204#p86204"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86204#p86204"><![CDATA[
<blockquote class="uncited"><div>8.5.5</div></blockquote>try:<div class="codebox"><p>Code: </p><pre><code>source -encoding iso8859-1 scripts/scanner.tcl</code></pre></div>u mean 8859 not 8659? ;p<br><br>:&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Thu Dec 11, 2008 4:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomcat]]></name></author>
		<updated>2008-12-11T16:07:09-04:00</updated>

		<published>2008-12-11T16:07:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86203#p86203</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86203#p86203"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86203#p86203"><![CDATA[
8.5.5<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10355">tomcat</a> — Thu Dec 11, 2008 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-11T15:32:16-04:00</updated>

		<published>2008-12-11T15:32:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86201#p86201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86201#p86201"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86201#p86201"><![CDATA[
<blockquote class="uncited"><div>source -encoding iso-8659-1 scripts/scanner.tcl<br>results in crash...</div></blockquote>tcl version 8.5.x? because its option from 8.5 <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=10332">tomekk</a> — Thu Dec 11, 2008 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomcat]]></name></author>
		<updated>2008-12-11T14:32:53-04:00</updated>

		<published>2008-12-11T14:32:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86199#p86199</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86199#p86199"/>
		<title type="html"><![CDATA[Problem with special characters ² ³ and °]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86199#p86199"><![CDATA[
source -encoding iso-8659-1 scripts/scanner.tcl<br>results in crash...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10355">tomcat</a> — Thu Dec 11, 2008 2:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
