Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
27cb4fc6
Commit
27cb4fc6
authored
Nov 25, 2018
by
kice
Committed by
Tianqi Chen
Nov 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix str decoding error on non-English Windows (#2158)
parent
d4f8d20e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
python/tvm/_ffi/base.py
+5
-1
No files found.
python/tvm/_ffi/base.py
View file @
27cb4fc6
...
...
@@ -18,7 +18,11 @@ if sys.version_info[0] == 3:
numeric_types
=
integer_types
+
(
float
,
np
.
float32
)
# this function is needed for python3
# to convert ctypes.char_p .value back to python str
py_str
=
lambda
x
:
x
.
decode
(
'utf-8'
)
if
sys
.
platform
==
"win32"
:
encoding
=
'cp'
+
str
(
ctypes
.
cdll
.
kernel32
.
GetACP
())
py_str
=
lambda
x
:
x
.
decode
(
encoding
)
else
:
py_str
=
lambda
x
:
x
.
decode
(
'utf-8'
)
else
:
string_types
=
(
basestring
,)
integer_types
=
(
int
,
long
,
np
.
int32
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment