Skip to content
Snippets Groups Projects
Commit 85675c23 authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

scripts: read_packages: open json in utf-8 mode explicitely

parent 20f51b09
No related branches found
No related tags found
No related merge requests found
...@@ -12,12 +12,13 @@ PACKAGES_KEY = "packages" ...@@ -12,12 +12,13 @@ PACKAGES_KEY = "packages"
PACKAGE_NAME_KEY = "pkgname" PACKAGE_NAME_KEY = "pkgname"
PACKAGE_URLS_KEY = "urls" PACKAGE_URLS_KEY = "urls"
import codecs
import json import json
import sys import sys
import os import os
def packageJsonToSimpleList(filename): def packageJsonToSimpleList(filename):
file_handle = open(filename, 'r') file_handle = codecs.open(filename, 'r', 'utf-8-sig')
pkginfo = json.load(file_handle) pkginfo = json.load(file_handle)
for category_name,category in pkginfo.items(): for category_name,category in pkginfo.items():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment