hgbook
changeset 776:c0794abb494e
Unicode fiddling.
author | Giulio@puck |
---|---|
date | Tue Aug 04 18:57:58 2009 +0200 (2009-08-04) |
parents | 85f013a831d9 |
children | 46c4ba8de2b1 |
files | it/web/genindex.py it/web/index-template.html |
line diff
1.1 --- a/it/web/genindex.py Tue Aug 04 18:30:58 2009 +0200 1.2 +++ b/it/web/genindex.py Tue Aug 04 18:57:58 2009 +0200 1.3 @@ -9,7 +9,7 @@ 1.4 chapters = (sorted(glob.glob('../ch*.xml')) + 1.5 sorted(glob.glob('../app*.xml'))) 1.6 1.7 -fp = open('index-read.html.in', 'w') 1.8 +fp = open('index-read.html.in', 'w', encoding='utf-8') 1.9 1.10 print(''' 1.11 <div class="navheader"><h1 class="booktitle">Mercurial: la guida definitiva<div class="authors">di Bryan O'Sullivan</div></h1></div> 1.12 @@ -23,7 +23,7 @@ 1.13 title = None 1.14 chapid = None 1.15 chaptype = None 1.16 - for line in open(c): 1.17 + for line in open(c, encoding='utf-8'): 1.18 m = chapter_re.search(line) 1.19 if m: 1.20 chaptype, chapid = m.groups()
2.1 --- a/it/web/index-template.html Tue Aug 04 18:30:58 2009 +0200 2.2 +++ b/it/web/index-template.html Tue Aug 04 18:57:58 2009 +0200 2.3 @@ -1,6 +1,7 @@ 2.4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2.5 <html> 2.6 <head> 2.7 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 2.8 <title>Mercurial: la guida definitiva</title> 2.9 <link rel="stylesheet" href="styles.css" type="text/css"/> 2.10 <!--