save kml file as utf-8
This commit is contained in:
@@ -22,7 +22,7 @@ from matplotlib.backends.backend_agg import FigureCanvas
|
|||||||
import gc
|
import gc
|
||||||
from pyparsing import ParseException
|
from pyparsing import ParseException
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
import codecs
|
||||||
import isodate
|
import isodate
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
@@ -1867,7 +1867,7 @@ def course_kmlemail_view(request,id=0):
|
|||||||
|
|
||||||
kmlfilename = 'course_{id}.kml'.format(id=id)
|
kmlfilename = 'course_{id}.kml'.format(id=id)
|
||||||
|
|
||||||
with open(kmlfilename,'w') as fop:
|
with codecs.open(kmlfilename,'w','utf-8') as fop:
|
||||||
fop.write(kmlstring)
|
fop.write(kmlstring)
|
||||||
|
|
||||||
res = myqueue(queuehigh,handle_sendemailkml,
|
res = myqueue(queuehigh,handle_sendemailkml,
|
||||||
|
|||||||
Reference in New Issue
Block a user