Page 1 of 1

UTF encoding problem in 0.8beta1

Posted: October 23rd, 2015, 7:51 am
by bcsc
After I change to the chinese language, there sames to be a prolem:
Maybe the mail template for chinese in utf-8 was not fit.

I clicked "test email" but failed:

Code: Select all

2015-10-23 20:25:53,364::INFO::[api:694] Sending testmail
2015-10-23 20:25:53,369::INFO::[_cplogging:216] [23/Oct/2015:20:25:53] HTTP 
Request Headers:
  REFERER: http://localhost:8080/sabnzbd/config/notify/
  HOST: localhost:8080
  CONNECTION: keep-alive
  Remote-Addr: ::1
  ACCEPT: */*
  USER-AGENT: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: zh-CN,zh;q=0.8
  ACCEPT-ENCODING: gzip, deflate, sdch
  COOKIE: plushQueuePerPage=9999999; plushHistPerPage=9999999; smplrefresh=5; plushContainerWidth=100%25; plushMultiOps=1; plushNoTopMenu=0; plushContainerWidth=100%25; plushMultiOps=1; plushNoTopMenu=0; plushHistPerPage=9999999
2015-10-23 20:25:53,369::ERROR::[_cplogging:216] [23/Oct/2015:20:25:53] HTTP 
Traceback (most recent call last):
  File "cherrypy\_cprequest.pyo", line 670, in respond
  File "cherrypy\lib\encoding.pyo", line 217, in __call__
  File "cherrypy\_cpdispatch.pyo", line 61, in __call__
  File "sabnzbd\interface.pyo", line 420, in tapi
  File "sabnzbd\api.pyo", line 100, in api_handler
  File "sabnzbd\api.pyo", line 701, in _api_test_email
  File "sabnzbd\emailer.pyo", line 254, in endjob
  File "sabnzbd\emailer.pyo", line 208, in send_with_template
  File "Cheetah\Template.pyo", line 1259, in __init__
  File "Cheetah\Template.pyo", line 1553, in _compile
  File "Cheetah\Template.pyo", line 743, in compile
  File "Cheetah\Compiler.pyo", line 1660, in compile
  File "Cheetah\Parser.pyo", line 1489, in parse
  File "Cheetah\Parser.pyo", line 1613, in eatDirective
  File "Cheetah\Parser.pyo", line 2587, in eatIf
  File "Cheetah\Parser.pyo", line 1159, in getExpressionParts
ParseError: 

Line ending expected
Line 12, column 41

Line|Cheetah Code
----|-------------------------------------------------------------
9   |To: $to
10  |From: $from
11  |Date: $date
12  |Subject: SABnzbd 已<!--#if $status then \"完成\" else \"失败\" #-->任务 $name
                                             ^
13  |X-priority: 5
14  |X-MS-priority: 5
15  |## 到主体部分时,必须要有空行!

BUT it works fine when I changed to EN.

Re: UTF encoding problem in 0.8beta1

Posted: October 23rd, 2015, 8:21 am
by shypike
I'll test, but my Chinese is very bad :(

Re: UTF encoding problem in 0.8beta1

Posted: October 24th, 2015, 6:02 am
by shypike
The Chinese translator made a few typos in the email templates.
Will be fixed in Beta2.
Thanks for the tip.