Skip to content

Commit

Permalink
Fix encoding problem with the categorie name + summary
Browse files Browse the repository at this point in the history
  • Loading branch information
lotooo committed Nov 13, 2014
1 parent 0a6f389 commit e442391
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ def CategoriesMenu(sender):
json_cat = Data.Load('categories.json')
objects = JSON.ObjectFromString(json_cat, encoding='iso-8859-15')
for categorie in objects['categories']:
clean_categorie_name = String.StripDiacritics(categorie['titre'])
clean_accroche = String.StripDiacritics(categorie['accroche'])
oc.add(
DirectoryObject(
key=Callback(MediaView, ContentType='category', ContentFilter=categorie['titre'], title=categorie['titre'] ),
title=L(categorie['titre']),
summary=L(categorie['accroche']),
key=Callback(MediaView, ContentType='category', ContentFilter=categorie['titre'], title=clean_categorie_name ),
title=L(clean_categorie_name),
summary=L(clean_accroche),
thumb=R(ICON),
art=R(ART)
)
Expand Down

0 comments on commit e442391

Please sign in to comment.