Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.090 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'encoding': 0.05; 'error:': 0.07; 'utf-8': 0.07; 'encode': 0.09; 'cc:addr:python-list': 0.11; 'apache': 0.15; 'codec': 0.16; 'combined.': 0.16; 'easier.': 0.16; 'gpg': 0.16; 'skip:" 80': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'rid': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'query': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'michael': 0.29; 'character': 0.29; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'index,': 0.31; 'skip:q 20': 0.31; 'file': 0.32; 'this.': 0.32; 'url:python': 0.33; '(most': 0.33; 'trouble': 0.34; 'subject:from': 0.34; 'subject: (': 0.35; "can't": 0.35; 'anywhere': 0.35; '(2)': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'being': 0.38; 'server': 0.38; '(3)': 0.38; 'files': 0.38; 'pm,': 0.38; 'recent': 0.39; 'explain': 0.39; 'sure': 0.39; 'url:mail': 0.40; 'skip:u 10': 0.60; 'easy': 0.60; 'tell': 0.60; 'from:charset:utf-8': 0.61; 'making': 0.63; 'real': 0.63; 'love': 0.65; 'to:addr:gmail.com': 0.65; 'life': 0.66; 'dont': 0.67; 'frustrated': 0.68; '8bit%:100': 0.72; 'easier,': 0.84; 'god,': 0.84; 'try,': 0.84; 'was:': 0.91; 'url:tk': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=sRq4/baSp9YMEzLOiroWxGhBUw5e7Ht6qG57JVcH7pE=; b=bf8Rc18R67EjkH5uCtQMrpmzWM3M7ShMwSBWoFXMezgjmj7CEbl7yAjEdb+g7V0xrT Qh9qC4+qfcf7WEq50p+2vemiRWrP0BbtOQj1Yrx3WxMjEfI17zbnbVK60c0UefajWf8x LTLU4SDFsj7UjygiDkdQo509L5IFc1OjVb8G6Kqay+RDdeszJw3Apd6rCI3nZ4VHMwJU HHNZjYz4xDFMpPah+YQ4rFkqIWxSxFCHbdjyiR7MCeSTULcOF8zBk5oN9fgVhe/4Ee74 4RdTspog2ivEA0g5C15oK9bvzIMaLb+J/yK4EQsg1gPC1o3Luc27RGGDINLM6kVxwVZR WEiw== X-Received: by 10.43.179.71 with SMTP id oz7mr1549025icc.43.1370368439065; Tue, 04 Jun 2013 10:53:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <2c425f2b-99de-4453-964e-c585f2043f71@googlegroups.com> <18755849-35bc-4925-811a-8f6f9fb5bf9c@googlegroups.com> <8c16324f-da12-44ff-bf2f-4ae56f9127c0@googlegroups.com> <51ac3bd6$0$11118$c3e8da3@news.astraweb.com> <51ad1cdd$0$11118$c3e8da3@news.astraweb.com> <306a22ea-fbf7-4097-af31-121a999957d6@googlegroups.com> <9c482ba0-23ac-4e66-a0e1-a18be9fd82d8@googlegroup> <06a19483-65df-4fcd-9430-b45a01c9dbab@googlegroups.com> From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= Date: Tue, 4 Jun 2013 19:53:38 +0200 Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) To: =?UTF-8?B?zp3Ouc66z4zOu86xzr/PgiDOms6/z43Pgc6xz4I=?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370368442 news.xs4all.nl 16007 [2001:888:2000:d::a6]:34475 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46949 On Tue, Jun 4, 2013 at 7:23 PM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF= =CF=82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82 wrote: > What on eart is this damn error: Michael tried to explain to me about sur= rogates but dont think i understand it. > > Encoding giving me trouble years now. > > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] Original exceptio= n was: > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] Traceback (most r= ecent call last): > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] File "files.py"= , line 72, in > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] cur.execute('= ''SELECT url FROM files WHERE url =3D %s''', (fullpath,) ) > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] File "/usr/loca= l/lib/python3.3/site-packages/PyMySQL3-0.5-py3.3.egg/pymysql/cursors.py", l= ine 108, in execute > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] query =3D que= ry.encode(charset) > [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] UnicodeEncodeErro= r: 'utf-8' codec can't encode character '\\udcd3' in position 61: surrogate= s not allowed > > > > PLEASE TELL EM WHAT TO TRY, PLEASE FOR THE LOVE OF GOD, IAM SO FRUSTRATED= NOT BEING ABLE TO DEAL WITH THIS. > -- > http://mail.python.org/mailman/listinfo/python-list 1. Try re-naming the files to real utf-8. Make sure your terminal works on UTF-8 characters. 2. Get rid of your bullshit system and use Flask or Pyramid. It will make your life much easier. 3. Put the files in a directory on your server and tell Apache to create an index, making your life easier, but not as easy as it would if you did (2) and anywhere near as easy as (2) and (3) combined. -- Kwpolska | GPG KEY: 5EAAEA16 stop html mail | always bottom-post http://asciiribbon.org | http://caliburn.nl/topposting.html