Eu editei (criei) o arquivo sitecustomize.py que estava dentro do diretório 
/usr/local/lib/python2.4/site-packages/sitecustomize.py  com o conteúdo:

 

import sys
sys.setdefaultencoding("utf-8")

 

Está tudo muito louco. 

1 - Nos meus formulários parece que funcionou, o erro "UnicodeDecodeError: 
'ascii' codec..." não aparece mais, porém quando o formulário é enviado, dá a 
mensagem de envio, porém ele não chega ao seu destino.

 

No "Mailer" do formulário, está configurado da seguinte forma:

 

Recipient's full name:   EMPRESA 

Recipient's e-mail address:   [EMAIL PROTECTED] 

Extract Recipient From:   None 

CC Recipients:   

BCC Recipients:   

Extract Reply-To From:   E-mail

Assunto:   Fale Conosco 

Extract Subject From:   None 

Body (prepended):   ***E-MAIL ENVIADO PELO FORMULÁRIO DE FALE CONOSCO*** 

Body (appended):   

Body (signature):   fale_conosco

Mail-Body Type:   HTML 

HTTP Headers:   HTTP_X_FORWARDED_FOR, REMOTE_ADDR, PATH_INFO 

Additional Headers:   

Key-Id:   

 

No template tem o seguinte código:

 

<html xmlns="http://www.w3.org/1999/xhtml";>

  <head><title></title></head>

  <body>

    <p tal:content="here/body_pre | nothing" />

    <dl>

        <tal:block repeat="field options/wrappedFields">

            <dt tal:content="field/fgField/widget/label" />

            <dd tal:content="structure python:field.htmlValue(request)" />

        </tal:block>

    </dl>

    <p tal:content="here/body_post | nothing" />

    <pre tal:content="here/body_footer | nothing" />

  </body>

</html>

 

2 - Pra piorar a busca do site não busca palavras acentuadas, dá aquele erro 
como nos formulários:

 

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: 
ordinal not in range(128)

 

Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CacheSetup.patch_cmf, line 50, in FSPT_pt_render
  Module Products.CacheSetup.patch_cmf, line 116, in PT_pt_render
   - <FSPageTemplate at /empresa/search>
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 749, in do_useMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 749, in do_useMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 310, in do_startEndTag
  Module TAL.TALInterpreter, line 356, in do_startTag
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: 
ordinal not in range(128)

 

 

Dá pra entender?

Concerta uma coisa e piora a outra.

Alguém pode me ajudar, por favor?

 

 

Atenciosamente,

 

Cristina  Tolentino

   Analista de Sistemas Web

 

Responder a