X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5A71A529E4 for ; Sun, 31 Jul 2005 04:16:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74566-05 for ; Sun, 31 Jul 2005 07:16:08 +0000 (GMT) Received: from hotmail.com (bay7-f23.bay7.hotmail.com [64.4.11.48]) by svr1.postgresql.org (Postfix) with ESMTP id 9AF0D5287D for ; Sun, 31 Jul 2005 04:16:06 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 31 Jul 2005 00:16:07 -0700 Message-ID: Received: from 200.232.125.2 by by7fd.bay7.hotmail.msn.com with HTTP; Sun, 31 Jul 2005 07:16:07 GMT X-Originating-IP: [200.232.125.2] X-Originating-Email: [rev0ltz@hotmail.com] X-Sender: rev0ltz@hotmail.com From: "Paulo Ricardo Stradioti" To: pgsql-interfaces@postgresql.org Subject: Problem With TCL Date: Sun, 31 Jul 2005 07:16:07 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 31 Jul 2005 07:16:07.0525 (UTC) FILETIME=[B85B3150:01C5959F] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.535 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER X-Spam-Level: ** X-Archive-Number: 200507/34 X-Sequence-Number: 5670 Hi all, My name is Paulo and I'm trying to make a tcl that allows my IRC Bot connects to my IRC Services (gnuworld) PostgreSQL database and get information about our channels. I thought it was working fine, until I tryed to find information about a channel called #espaņa. For our surprise the bot told "No records found for #espaņa". So I got curious and made other tests... it doesn't works for any channels with chars like ã in the name. I already tryed to google it, but (may be my bad, anyway, ) I didn't find much. Could anyone help me please? My TCL code that checks information about that channels is: bind pub $cservice(flags) ${cservice(char)}info pub.info:cservice proc pub.info:cservice {nick uhost hand chan rest} { global cservice if {[lindex $rest 0] == ""} { putserv "Notice $nick :Command should be: \002$cservice(char)purge \<#ChannelName\>\002" if {$cservice(dchan) != ""} { putserv "PRIVMSG $cservice(dchan) :\002\[\002CSC\002/\002Debug\002\]\002 Failed attemp to get \002PURGE\002 information from \002${nick}\002!${uhost} ($hand). Reason: \002Wrong Command Syntax\002" } return 0 } if {![string match "#*" [lindex $rest 0]]} { putserv "NOTICE $nick :\002[string toupper [lindex $rest 0]]\002 doesn't seems to be a valid Channel Name!" return 0 } set conexao [pg_connect $cservice(database) -host $cservice(host) -port $cservice(port)] putserv "NOTICE $nick :Please wait while I get \002[string toupper $cservice(command_purge)]\002 information about channel \002[string tolower [lindex $rest 0]]\002" set query [pg_exec $conexao "SELECT * FROM channels WHERE lower(name)='[string tolower [lindex $rest 0]]'";] if {[pg_result $query -numTuples] > 0} { putserv "NOTICE $nick :Results Found" } else { putserv "NOTICE $nick :No records found" } pg_disconnect $conexao } Well... another interesting notes: I can see information about that kind of channel name using a third part PHP nterface. Current server encoding is 'SQL_ASCII'. (I'm not familiar with that... but some guys told that it may be usefull). Thanks for your time guys. Hugs. Paulo _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/