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

	<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>2010-10-11T18:13:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-10-11T18:13:06-04:00</updated>

		<published>2010-10-11T18:13:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94694#p94694</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94694#p94694"/>
		<title type="html"><![CDATA[Re: Issues with special characters in scripts.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94694#p94694"><![CDATA[
<blockquote class="uncited"><div>I hope that I am able to explain this correctly, because nobody was able to help me on #eggdrop at Freenode. <br><br>Eggdrop scripts like Bogustrivia and GTranslate do not show special characters correctly, but show question-marks on many computers of my channel's users.  I have no issues with mIRC, but I do not see the characters correctly with Pidgin. <div class="codebox"><p>Code: </p><pre><code>(16:18:28) ujjain: !tr de I am a loner.(16:18:30) OmeletBot: (en) Ich bin ein Einzelg?nger.</code></pre></div>I never had issues with foreign characters before with Pidgin when users used utf-8,only when they used a regional charset. Eggdrop is set to use utf-8. I checked this by adding a line that prints encoding in eggdrop.conf<br><br>The sourcecode of the script can be viewed at: <a href="http://www.codepad.eu/view/85674687" class="postlink">http://www.codepad.eu/view/85674687</a>. <br><br>When I have the bot talk in the channel via partyline, everything goes alright.</div></blockquote>That script doesn't appear to make use of utf-8, either through encodings or http config settings. It's making huge assumptions. So....<br><blockquote class="uncited"><div>&lt;speechles&gt; !tr @de I am a loner.<br>&lt;sp33chy&gt; Google: (auto-&gt;de) English to German translation<br>&lt;sp33chy&gt; Ich bin ein Einzelgänger.</div></blockquote>Here is an alternative way to check. Try using my script: <a href="http://forum.egghelp.org/viewtopic.php?t=13586" class="postlink"><strong class="text-strong">here</strong></a> which includes google translations (among other things <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">). While mine doesn't use the API, mine does things a little differently. Google is given special queries with mine that set the input/output encodings correctly to utf-8 while making queries. Mine also properly makes use of the -urlencoding feature of http package 2.5+ which should be set to utf-8, default is iso8859-1. I suspect this is where your issues are coming from. Try my script and see if these issues magically disappear. If so I can give you some quick hacks to correct that scripts short comings and make it work correctly.<br><br>NOTE: Also, that script limits itself for no reason to these languages below:<br>set lngs { "fr" "en" "es" "de" "it" "nl" }<br><br>Why it does this is beyond me. Google supports language's on the fly. So mine doesn't care what you put. If google supports it, you will either see a message saying "It's not supported yet" or the translated text. Your script appears to limit itself severly, so much so that Russians/Serbians/Hindis/Arabs/etc can't use it at all (racist perhaps?). Mine doesn't have any limitations, as google supports more languages my script natively works with them, always.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Oct 11, 2010 6:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ujjain]]></name></author>
		<updated>2010-10-11T10:26:21-04:00</updated>

		<published>2010-10-11T10:26:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94691#p94691</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94691#p94691"/>
		<title type="html"><![CDATA[Issues with special characters in scripts.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94691#p94691"><![CDATA[
I hope that I am able to explain this correctly, because nobody was able to help me on #eggdrop at Freenode. <br><br>Eggdrop scripts like Bogustrivia and GTranslate do not show special characters correctly, but show question-marks on many computers of my channel's users.  I have no issues with mIRC, but I do not see the characters correctly with Pidgin. <div class="codebox"><p>Code: </p><pre><code>(16:18:28) ujjain: !tr de I am a loner.(16:18:30) OmeletBot: (en) Ich bin ein Einzelg?nger.</code></pre></div>I never had issues with foreign characters before with Pidgin when users used utf-8,only when they used a regional charset. Eggdrop is set to use utf-8. I checked this by adding a line that prints encoding in eggdrop.conf<br><br>The sourcecode of the script can be viewed at: <a href="http://www.codepad.eu/view/85674687" class="postlink">http://www.codepad.eu/view/85674687</a>. <br><br>When I have the bot talk in the channel via partyline, everything goes alright.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11385">ujjain</a> — Mon Oct 11, 2010 10:26 am</p><hr />
]]></content>
	</entry>
	</feed>
