Skip to content
This repository has been archived by the owner on Feb 10, 2018. It is now read-only.

Commit

Permalink
Use codecs module for unicode import from json file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaustav Das Modak committed Jan 23, 2013
1 parent f8c600d commit 818d0d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyavrophonetic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# Imports
import os
import simplejson as json
import codecs


# Constants
Expand All @@ -36,7 +37,7 @@
AVRO_DICT_FILE = os.path.abspath(os.path.join(BASE_PATH,
"resources/avrodict.json"))
# -- Loads json data from avrodict.json
AVRO_DICT = json.load(open(AVRO_DICT_FILE))
AVRO_DICT = json.load(codecs.open(AVRO_DICT_FILE, encoding='utf-8'))
# -- Shortcut to vowels
AVRO_VOWELS = set(AVRO_DICT['data']['vowel'])
# -- Shortcut to consonants
Expand Down

0 comments on commit 818d0d1

Please sign in to comment.