From b048ea1edf273a12ceecbeb1cf6031f6124d8527 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 28 Nov 2013 15:34:17 +0000 Subject: [PATCH] Force index entries to be unicode to fix problems with unicode normalization --- sphinx/environment.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphinx/environment.py b/sphinx/environment.py index 3c9c830c1..919ae7102 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -1489,6 +1489,10 @@ class BuildEnvironment: new = {} def add_entry(word, subword, link=True, dic=new): + # Force the word to be unicode if it's a ASCII bytestring. + # This will solve problems with unicode normalization later. + # For instance the RFC role will add bytestrings at the moment + word = unicode(word) entry = dic.get(word) if not entry: dic[word] = entry = [[], {}]