win.cp can use ffi library to get system codepage.