Skip to content

Commit 281ddd0

Browse files
committed
(limited) implementation of PyUnicode_DecodeFSDefault
1 parent 7083a26 commit 281ddd0

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)