changeset 296:a7455b0dc144

Fix feed fetching.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Jan 2015 14:14:17 +0200
parents 141bb4a2b76f
children ecd465aab52e
files fetch_feeds.tcl
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/fetch_feeds.tcl	Mon Jan 26 14:07:16 2015 +0200
+++ b/fetch_feeds.tcl	Mon Jan 26 14:14:17 2015 +0200
@@ -24,9 +24,9 @@
 package require http
 
 if {[info exists http_user_agent] && $http_user_agent != ""} {
-  ::http::config -urlencoding iso8859-1 -useragent $http_user_agent
+  ::http::config -urlencoding utf8 -useragent $http_user_agent
 } else {
-  ::http::config -urlencoding iso8859-1 -useragent "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 9.5"
+  ::http::config -urlencoding utf8 -useragent "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 9.5"
 }
 
 if {[info exists http_use_proxy] && $http_use_proxy != 0} {
@@ -50,9 +50,9 @@
     set utest "$uprefix$utmp"
   }
 
-  set usql "SELECT title FROM feeds WHERE url='[escape $utest]' AND feed='[escape $uname]'"
+  set usql "SELECT title FROM feeds WHERE url='[utl_escape $utest]' AND feed='[utl_escape $uname]'"
   if {![feeds_db exists $usql]} {
-    set usql "INSERT INTO feeds (feed,utime,url,title) VALUES ('[escape $uname]', $currclock, '[escape $utest]', '[escape $utitle]')"
+    set usql "INSERT INTO feeds (feed,utime,url,title) VALUES ('[utl_escape $uname]', $currclock, '[utl_escape $utest]', '[utl_escape $utitle]')"
     incr nitems
     if {[catch {feeds_db eval $usql} uerrmsg]} {
       puts "\nError: $uerrmsg on:\n$usql"