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

	<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>2012-02-09T02:12:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-09T02:12:18-04:00</updated>

		<published>2012-02-09T02:12:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98747#p98747</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98747#p98747"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98747#p98747"><![CDATA[
@Johannes13 : Interesting. Thanks for sharing. <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> — Thu Feb 09, 2012 2:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-08T18:24:19-04:00</updated>

		<published>2012-02-08T18:24:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98746#p98746</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98746#p98746"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98746#p98746"><![CDATA[
@Johannes13 thanks for your concern<br><br>Currently, my script is working with any problems.<br><br>Thank you so much! <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=11617">Regex</a> — Wed Feb 08, 2012 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-08T12:38:37-04:00</updated>

		<published>2012-02-08T12:38:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98742#p98742</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98742#p98742"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98742#p98742"><![CDATA[
Ohh, and why do you subst when you got the page contents?<br><br>It can be (ab)used to inject commands.<br><br>And you know that there is a command called ::http::formatQuery?<br><br>It does basicaly the same thing as my enc proc does.<br><br><div class="codebox"><p>Code: </p><pre><code>bind pub - !ingilizce msg_englishproc msg_english {nick uhost hand chan text} {  global botnick cmd_chan  if {![string match -nocase "$cmd_chan" $chan]} {return}  set connect [::http::geturl http://www.sozluk.com.tr/sozluk.php?[::http::formatQuery word $text]]  set files [::http::data $connect]  set list [split $files "\n"]  foreach i $list {    if {[regexp -- {&lt;td class="col-t"&gt;(.+?)&lt;/td&gt;} $i - translation]} {      set translation [encoding convertfrom utf-8 [subst -nocommands -novariables [regsub -all {%([a-fA-F0-9]{2})} $translation {\u\1}]]]      putquick "privmsg $cmd_chan \0033$text: $translation"      unset translation    }  }  ::http::cleanup $files}putlog "Dictionary TCL - Idea By CLubber" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Wed Feb 08, 2012 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-08T12:12:41-04:00</updated>

		<published>2012-02-08T12:12:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98740#p98740</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98740#p98740"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98740#p98740"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc enc v {subst [regsub -all {[^a-zA-Z0-9\-_\.~]} [encoding convertto utf-8 $v] {[format %%%02X [scan {\0} %c]]}]}proc decode v {encoding convertfrom utf-8 [subst -nocommands -novariables [regsub -all {%([a-fA-F0-9]{2})} $v {\u\1}]]}</code></pre></div>should work.<br><br>Why make such a big string map/regexp thing that slows down everything?<br>(and is complex to maintain)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Wed Feb 08, 2012 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-08T09:47:33-04:00</updated>

		<published>2012-02-08T09:47:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98738#p98738</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98738#p98738"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98738#p98738"><![CDATA[
@caesar thanks for your concern but still aint workin.<br><br>«15:43:01» &lt;ZaL&gt; !ingilizce Turk<br>«15:43:02» &lt;SEO&gt; Turk: TÃ¼rk soyundan kimse<br><br>Just utf-8 characters making this.<br><br>How can we correct this with other ways?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11617">Regex</a> — Wed Feb 08, 2012 9:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-08T03:40:51-04:00</updated>

		<published>2012-02-08T03:40:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98735#p98735</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98735#p98735"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98735#p98735"><![CDATA[
I think you could use <em class="text-italics">string map -nocase</em> instead of the <em class="text-italics">regsub </em>lines, for example:<div class="codebox"><p>Code: </p><pre><code>set text "one TWO TeN"set text [string map -nocase {one 1 two 2 ten 10} $text]</code></pre></div>I tried your letters to figure out if it will work or not, but my copy/paste fails to copy the correct letters in my shell prompt for some reason, for example the ğ ends up as a . (dot). <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>Anyway, i think you can replace:<div class="codebox"><p>Code: </p><pre><code>  regsub -all "ç" $text "%C3%A7" text  regsub -all "Ç" $text "%C3%87" text  regsub -all "ğ" $text "%C4%9F" text  regsub -all "Ğ" $text "%C4%9E" text  regsub -all "ı" $text "%C4%B1" text  regsub -all "İ" $text "%C4%B0" text  regsub -all "ö" $text "%C3%B6" text  regsub -all "Ö" $text "%C3%96" text  regsub -all "ş" $text "%C5%9F" text  regsub -all "Ş" $text "%C5%9E" text  regsub -all "ü" $text "%C3%BC" text  regsub -all "Ü" $text "%C3%9C" text</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>string map -nocase {ç %C3%A7 Ç %C3%87 ğ %C4%9F Ğ %C4%9E ı %C4%B1 İ %C4%B0 ö %C3%B6 Ö %C3%96 ş %C5%9F Ş %C5%9E ü %C3%BC Ü %C3%9C} $text</code></pre></div>and:<div class="codebox"><p>Code: </p><pre><code>      regsub -all "%C3%A7" $text "ç" text      regsub -all "%C3%87" $text "Ç" text      regsub -all "%C4%9F" $text "ğ" text      regsub -all "%C4%9E" $text "Ğ" text      regsub -all "%C4%B1" $text "ı" text      regsub -all "%C4%B0" $text "İ" text      regsub -all "%C3%B6" $text "ö" text      regsub -all "%C3%96" $text "Ö" text      regsub -all "%C5%9F" $text "ş" text      regsub -all "%C5%9E" $text "Ş" text      regsub -all "%C3%BC" $text "ü" text      regsub -all "%C3%9C" $text "Ü" text      regsub -all "Ã§" $translation "ç" translation      regsub -all "Ã‡" $translation "Ç" translation      regsub -all "ÄŸ" $translation "ğ" translation      regsub -all "Ä±" $translation "ı" translation      regsub -all "Ä°" $translation "İ" translation      regsub -all "Ã¶" $translation "ö" translation      regsub -all "Ã–" $translation "Ö" translation      regsub -all "ŞŸ" $translation "ş" translation      regsub -all "Å" $translation "Ş" translation      regsub -all "Ã¼" $translation "ü" translation      regsub -all "Ãœ" $translation "Ü" translation </code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>string map -nocase {%C3%A7 ç %C3%87 Ç %C4%9F ğ %C4%9E Ğ %C4%B1 ı %C4%B0 İ %C3%B6 ö %C3%96 Ö %C5%9F ş %C5%9E Ş %C3%BC ü %C3%9C Ü} $textstring map -nocase {Ã§ ç Ã‡ Ç ÄŸ ğ Ä± ı Ä° İ Ã¶ ö Ã– Ö ŞŸ ş Å Ş Ã¼ ü Ãœ Ü} $translation</code></pre></div>You will have to test this by yourself as my copy/paste fails miserably. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 08, 2012 3:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-07T18:39:30-04:00</updated>

		<published>2012-02-07T18:39:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98730#p98730</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98730#p98730"/>
		<title type="html"><![CDATA[How can i use regsub command for web read?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98730#p98730"><![CDATA[
Hi dear egghelp.org moderators,<br><br>I'm searching regsub command for web read. <br><div class="codebox"><p>Code: </p><pre><code># Komutun Kullanılacağı Kanalset cmd_chan "#OperLog"bind pub - !ingilizce msg_englishproc msg_english {nick uhost hand chan text} {  global botnick cmd_chan  if {![string match -nocase "$cmd_chan" $chan]} {return}  regsub -all "ç" $text "%C3%A7" text  regsub -all "Ç" $text "%C3%87" text  regsub -all "ğ" $text "%C4%9F" text  regsub -all "Ğ" $text "%C4%9E" text  regsub -all "ı" $text "%C4%B1" text  regsub -all "İ" $text "%C4%B0" text  regsub -all "ö" $text "%C3%B6" text  regsub -all "Ö" $text "%C3%96" text  regsub -all "ş" $text "%C5%9F" text  regsub -all "Ş" $text "%C5%9E" text  regsub -all "ü" $text "%C3%BC" text  regsub -all "Ü" $text "%C3%9C" text  set (document) ""  set ("#history-button") ""  set ("#history") ""  set ("#history-clear") ""  set connect [::http::geturl http://www.sozluk.com.tr/sozluk.php?word=$text]   set files [::http::data $connect]   set list [split [subst -nocommands $files] "\n"]  foreach i $list {    regexp -- {&lt;td class="col-t"&gt;(.+?)&lt;/td&gt;} $i - translation    if {[info exists translation]} {       regsub -all "%C3%A7" $text "ç" text      regsub -all "%C3%87" $text "Ç" text      regsub -all "%C4%9F" $text "ğ" text      regsub -all "%C4%9E" $text "Ğ" text      regsub -all "%C4%B1" $text "ı" text      regsub -all "%C4%B0" $text "İ" text      regsub -all "%C3%B6" $text "ö" text      regsub -all "%C3%96" $text "Ö" text      regsub -all "%C5%9F" $text "ş" text      regsub -all "%C5%9E" $text "Ş" text      regsub -all "%C3%BC" $text "ü" text      regsub -all "%C3%9C" $text "Ü" text      regsub -all "Ã§" $translation "ç" translation      regsub -all "Ã‡" $translation "Ç" translation      regsub -all "ÄŸ" $translation "ğ" translation      regsub -all "Ä±" $translation "ı" translation      regsub -all "Ä°" $translation "İ" translation      regsub -all "Ã¶" $translation "ö" translation      regsub -all "Ã–" $translation "Ö" translation      regsub -all "ŞŸ" $translation "ş" translation      regsub -all "Å" $translation "Ş" translation      regsub -all "Ã¼" $translation "ü" translation      regsub -all "Ãœ" $translation "Ü" translation      putquick "privmsg $cmd_chan 3$text: 1$ translation"      unset translation    }  }  ::http::cleanup $files}putlog "Dictionary TCL - Written By CLubber"</code></pre></div>Shortly,    regsub -all "Ã§" $translation "ç" translation &lt; this command in my script isn't working.<br><br>How can correct turkish characters?<br><br>«00:30:47» &lt;07ZaL&gt; !ingilizce divine<br>«00:30:48» &lt;Eggdrop&gt; divine: TanrÄ± gibi olan<br><br>I wanna correct this "Ä±" =&gt; "ı" <br><br>I hope i could explain my problem. <br><br>Thx for your concers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11617">Regex</a> — Tue Feb 07, 2012 6:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
