Skip to content

Commit 9545ee3

Browse files
committedOct 8, 2015
Fix #2137 -- capitalize UTF-8 properly in locale guessing
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 885ce80 commit 9545ee3

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
 

‎CHANGES.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
New in master
2+
=============
3+
4+
Features
5+
--------
6+
7+
Bugfixes
8+
--------
9+
10+
* Capitalize "UTF-8" properly in locale guessing (Issue #2137)
11+
112
New in v7.7.2
213
=============
314

‎nikola/nikola.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2254,7 +2254,7 @@ def valid_locale_fallback(desired_locale=None):
22542254
"""
22552255
# Whenever fallbacks change, adjust test TestHarcodedFallbacksWork
22562256
candidates_windows = [str('English'), str('C')]
2257-
candidates_posix = [str('en_US.utf8'), str('C')]
2257+
candidates_posix = [str('en_US.UTF-8'), str('C')]
22582258
candidates = candidates_windows if sys.platform == 'win32' else candidates_posix
22592259
if desired_locale:
22602260
candidates = list(candidates)
@@ -2288,7 +2288,7 @@ def guess_locale_from_lang_posix(lang):
22882288
locale_n = str(lang)
22892289
else:
22902290
# this works in Travis when locale support set by Travis suggestion
2291-
locale_n = str((locale.normalize(lang).split('.')[0]) + '.utf8')
2291+
locale_n = str((locale.normalize(lang).split('.')[0]) + '.UTF-8')
22922292
if not is_valid_locale(locale_n):
22932293
# http://thread.gmane.org/gmane.comp.web.nikola/337/focus=343
22942294
locale_n = str((locale.normalize(lang).split('.')[0]))

0 commit comments

Comments
 (0)
Failed to load comments.