Manolo Padron Martinez | 5 Aug 2009 12:01
Picon

Problem with codification on Venus

Hi:

I'm using venus for a planet but I'm having some problems with
codification. I've planetized some blogs that use Spanish and English
with UTF-8 and some symbols seems to be wrong. Any Idea? Any solution?

Regards from Canary Islands

Manuel Padrón Martínez
--

-- 
devel mailing list
devel <at> lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
Sam Ruby | 5 Aug 2009 12:36
Favicon
Gravatar

Re: Problem with codification on Venus

Manolo Padron Martinez wrote:
> Hi:
> 
> I'm using venus for a planet but I'm having some problems with
> codification. I've planetized some blogs that use Spanish and English
> with UTF-8 and some symbols seems to be wrong. Any Idea? Any solution?

You haven't given enough information to provide a complete answer (a 
link to one of these blogs would be helpful), but one common problem is 
that you aren't serving the pages produced as utf-8 (the web default is 
iso-8859-1).  See the following for instructions:

   http://www.w3.org/International/O-HTTP-charset

An alternate approach is to add the following near to the top of the 
<head> section in your template:

   <meta charset="utf-8"/>

> Regards from Canary Islands
> 
> Manuel Padrón Martínez

- Sam Ruby
--

-- 
devel mailing list
devel <at> lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
Manolo Padron Martinez | 5 Aug 2009 12:44
Picon

Re: Problem with codification on Venus

Hi:

> You haven't given enough information to provide a complete answer (a link to
> one of these blogs would be helpful), but one common problem is that you
> aren't serving the pages produced as utf-8 (the web default is iso-8859-1).
>  See the following for instructions:

Thanks Sam.
This are two blogs that making me crazy :
http://hombrealto.com/web/?q=taxonomy/term/20/0
http://www.rpenalva.com/blog/

As I know they have their head well formed (so If you go directly to
their blogs all appears as it should)

In the planet (http://planet.codepixel.com/) we have this meta too (
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> )

So I still have no clues

Regards from Canary Islands

Manuel Padrón Martínez
--

-- 
devel mailing list
devel <at> lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
Sam Ruby | 5 Aug 2009 14:09
Favicon
Gravatar

Re: Problem with codification on Venus

Manolo Padron Martinez wrote:
> Hi:
> 
>> You haven't given enough information to provide a complete answer (a link to
>> one of these blogs would be helpful), but one common problem is that you
>> aren't serving the pages produced as utf-8 (the web default is iso-8859-1).
>>  See the following for instructions:
> 
> Thanks Sam.
> This are two blogs that making me crazy :
> http://hombrealto.com/web/?q=taxonomy/term/20/0
> http://www.rpenalva.com/blog/
> 
> As I know they have their head well formed (so If you go directly to
> their blogs all appears as it should)
> 
> In the planet (http://planet.codepixel.com/) we have this meta too (
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> )
> 
> So I still have no clues

I took a look at what your server is returning using a tool named curl.

$ curl --head http://planet.codepixel.com/
HTTP/1.1 200 OK
Date: Wed, 05 Aug 2009 12:40:09 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch4 mod_ssl/2.2.3 OpenSSL/0.9.8c
Last-Modified: Wed, 05 Aug 2009 12:30:24 GMT
ETag: "781a61f-1b38d-2acd9800"
Accept-Ranges: bytes
(Continue reading)

Manolo Padron Martinez | 5 Aug 2009 15:37
Picon

Re: Problem with codification on Venus

Thanks again Sam. Solved, just a .htaccess and everything goes at it should :)

Regards from Canary Islands

Manuel Padrón Martínez
--

-- 
devel mailing list
devel <at> lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
Ali Ebrahim | 16 Aug 2009 12:13
Favicon

& converted into &amp; which breaks links

Hi,

I have two questions, will ask in sequence.

Question 1: Ampersand Parsing
-----------------------------

When I use a source feed like this:

http://feeds.feedburner.com/AkhbarBiladImaniyah

All the post title links have ampersands in them, but after Venus is 
done parsing, it changes the & into &amp; and this breaks the links. For 
example, this:

http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&AkhbarID=1608&AkhbarMonth=8&AkhbarYear=1430

becomes this:

http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&amp;AkhbarID=1607&amp;AkhbarMonth=8&amp;AkhbarYear=1430

And this problem exists in the generated HTML page and the generated 
Atom file as well. You can see the output on:

http://planetbohra.org/
-and-
http://planetbohra.org/atom.xml

How can I avoid this problem?

(Continue reading)

Sam Ruby | 17 Aug 2009 16:17
Favicon
Gravatar

Re: & converted into &amp; which breaks links

Ali Ebrahim wrote:
> Hi,
> 
> I have two questions, will ask in sequence.
> 
> Question 1: Ampersand Parsing
> -----------------------------
> 
> When I use a source feed like this:
> 
> http://feeds.feedburner.com/AkhbarBiladImaniyah
> 
> All the post title links have ampersands in them, but after Venus is 
> done parsing, it changes the & into &amp; and this breaks the links. For 
> example, this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&AkhbarID=1608&AkhbarMonth=8&AkhbarYear=1430
> 
> becomes this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&amp;AkhbarID=1607&amp;AkhbarMonth=8&amp;AkhbarYear=1430
> 
> And this problem exists in the generated HTML page and the generated 
> Atom file as well. You can see the output on:
> 
> http://planetbohra.org/
> -and-
> http://planetbohra.org/atom.xml
> 
> How can I avoid this problem?
(Continue reading)

Sam Ruby | 17 Aug 2009 16:16
Favicon
Gravatar

Re: & converted into &amp; which breaks links

Ali Ebrahim wrote:
> Hi,
> 
> I have two questions, will ask in sequence.
> 
> Question 1: Ampersand Parsing
> -----------------------------
> 
> When I use a source feed like this:
> 
> http://feeds.feedburner.com/AkhbarBiladImaniyah
> 
> All the post title links have ampersands in them, but after Venus is 
> done parsing, it changes the & into &amp; and this breaks the links. For 
> example, this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&AkhbarID=1608&AkhbarMonth=8&AkhbarYear=1430
> 
> becomes this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&amp;AkhbarID=1607&amp;AkhbarMonth=8&amp;AkhbarYear=1430
> 
> And this problem exists in the generated HTML page and the generated 
> Atom file as well. You can see the output on:
> 
> http://planetbohra.org/
> -and-
> http://planetbohra.org/atom.xml
> 
> How can I avoid this problem?
(Continue reading)

Sam Ruby | 17 Aug 2009 16:15
Favicon
Gravatar

Re: & converted into &amp; which breaks links

Ali Ebrahim wrote:
> Hi,
> 
> I have two questions, will ask in sequence.
> 
> Question 1: Ampersand Parsing
> -----------------------------
> 
> When I use a source feed like this:
> 
> http://feeds.feedburner.com/AkhbarBiladImaniyah
> 
> All the post title links have ampersands in them, but after Venus is 
> done parsing, it changes the & into &amp; and this breaks the links. For 
> example, this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&AkhbarID=1608&AkhbarMonth=8&AkhbarYear=1430
> 
> becomes this:
> 
> http://www.zeninfosys.net/zeninfosys/archive_akhbar_details.php?AkhbarType=3&amp;AkhbarID=1607&amp;AkhbarMonth=8&amp;AkhbarYear=1430
> 
> And this problem exists in the generated HTML page and the generated 
> Atom file as well. You can see the output on:
> 
> http://planetbohra.org/
> -and-
> http://planetbohra.org/atom.xml
> 
> How can I avoid this problem?
(Continue reading)

James Vasile | 20 Aug 2009 22:25
Gravatar

Patch

One of the neat things about Planet is that it passes channel settings
in the config.ini through to the template.  This makes the face
settings possible without any reference to faces in the code.  It's
cool.

For some reason, we don't do that with planet-level settings.  I have
some custom fields in config.ini that I want the template to see, so I
adjusted tmpl.py to pass config.planet_options() to the template.

Patch is below.  Released uner GPL and Python license.

Regards,
James Vasile

=== modified file 'planet/shell/tmpl.py'
--- planet/shell/tmpl.py        2009-01-09 08:11:16 +0000
+++ planet/shell/tmpl.py        2009-08-20 20:15:44 +0000
 <at>  <at>  -182,6 +182,16  <at>  <at> 
     context.sources.append(context.source)
     del context['source']

+def merge_dict(a, b):
+    """Return a hash containing all the keys and vals of a and all
+    those of b that don't clash with a.  Modifies a in place and also
+    returns a."""
+
+    for key in b.keys():
+        if not a.has_key(key):
+            a[key] = b[key]
+    return a
(Continue reading)


Gmane