Skip to content

Commit 6392d0a

Browse files
[GR-30348] Implementation of PyUnicode_DecodeFSDefault.
PullRequest: graalpython/1725
2 parents b4bc279 + 281ddd0 commit 6392d0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graalpython/com.oracle.graal.python.cext/src/unicodeobject.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ PyObject* PyUnicode_FromString(const char* o) {
218218
return to_sulong(polyglot_from_string(o, SRC_CS));
219219
}
220220

221+
PyObject* PyUnicode_DecodeFSDefault(const char* o) {
222+
// TODO: this implementation does not honor Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
223+
return to_sulong(polyglot_from_string(o, "utf-8"));
224+
}
225+
221226
static PyObject* _PyUnicode_FromUTF8(const char* o) {
222227
return to_sulong(polyglot_from_string(o, "utf-8"));
223228
}

0 commit comments

Comments
 (0)