Skip to content

Commit 648d6d1

Browse files
committed
fix encoding for Windows
#198
1 parent 02f0b95 commit 648d6d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/iruby/jupyter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def windows_user_appdata
3737
case call_SHGetFolderPathW(Fiddle::NULL, csidl_appdata, Fiddle::NULL, 0, path)
3838
when 0
3939
len = (1 ... (path.size/2)).find {|i| path[2*i, 2] == "\0\0" }
40-
path = path.to_str(2*len).force_encoding(Encoding::UTF_16LE)
40+
path = path.to_str(2*len).encode(Encoding::UTF_8, Encoding::UTF_16LE)
4141
else
4242
ENV.fetch('APPDATA', '')
4343
end

0 commit comments

Comments
 (0)