On Wed, 2006-09-20 at 02:52 +0000, Enrico wrote:
> Hi,
> 
> I noticed that when a call a template encoded with UTF-8 with BOM using
> an inclusion tag the BOM gets printed and sometimes can mess with the
> layout.
> 
> It took me some time to find out that the extra BOM's were resulting in
> an extra margin.

You are very unlucky (or there is a rendering bug in your browser). The
BOM should be treated as a *zero width* non breaking space when found in
the middle of a stream like that, so the only way it is going to screw
up the margins is by joining two characters together when there would
otherwise have been a line break in the middle (that is where you have
been very unlucky).

> Maybe the BOM should be kept only on the first (base) template and
> removed from the subsequent ones.

It's recommended to avoid using a BOM with UTF-8 encoded files that are
included into other files for just this reason. If you can fix it at the
source, that would be best. However, I realise there are, for example,
large companies based in the north-western United States who have long
struggled with best practices for Unicode and some of their editors
insist on including this cruft.

File an enhancement ticket request and somebody might want to play with
fixing it. It adds some extra processing to a fairly critical path, but
it's something we can look at in the process of doing the internal
unicode conversion.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to