Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
fc532fa2
Commit
fc532fa2
authored
Apr 28, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better unicode error.
parent
5fb3f95f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+4
-2
No files found.
Cython/Compiler/Main.py
View file @
fc532fa2
...
@@ -149,10 +149,12 @@ class Context:
...
@@ -149,10 +149,12 @@ class Context:
filename_encoding
=
sys
.
getdefaultencoding
()
filename_encoding
=
sys
.
getdefaultencoding
()
name
=
source_filename
.
decode
(
filename_encoding
)
name
=
source_filename
.
decode
(
filename_encoding
)
s
=
PyrexScanner
(
f
,
name
,
source_encoding
=
f
.
encoding
,
type_names
=
type_names
,
context
=
self
)
try
:
try
:
s
=
PyrexScanner
(
f
,
name
,
source_encoding
=
f
.
encoding
,
type_names
=
type_names
,
context
=
self
)
tree
=
Parsing
.
p_module
(
s
,
pxd
,
full_module_name
)
tree
=
Parsing
.
p_module
(
s
,
pxd
,
full_module_name
)
except
UnicodeDecodeError
,
msg
:
error
((
name
,
0
,
0
),
"Decoding error, set coding=<encoding-name> at top of source (%s)"
%
msg
)
finally
:
finally
:
f
.
close
()
f
.
close
()
if
Errors
.
num_errors
>
0
:
if
Errors
.
num_errors
>
0
:
...
...
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