summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 59040824ad..4f0c0d29c1 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2270,7 +2270,7 @@ rb_w32_conv_from_wstr(const WCHAR *wstr, long *lenp, rb_encoding *enc)
long len;
char *ptr;
- if (NIL_P(str)) return wstr_to_filecp(wstr, lenp);
+ if (NIL_P(str)) return wstr_to_utf8(wstr, lenp);
*lenp = len = RSTRING_LEN(str);
memcpy(ptr = malloc(len + 1), RSTRING_PTR(str), len);
ptr[len] = '\0';