じ☆ve冰风 发表于 2024-4-20 01:52:21

String#convert

参考资料:libconv

RUBY 代码
classString
ICONV = "iconv.dll"

Iconv_open = Win32API.new(ICONV, 'libiconv_open', 'PP', 'L')
Iconv_close = Win32API.new(ICONV, 'libiconv_close', 'L', 'L')
Iconv_do = Win32API.new(ICONV, 'libiconv', 'LPPPP', 'L')

def convert(dst_charset, src_charset = 'UTF-8')
    dst_str = "\0" * (self.size
页: [1]
查看完整版本: String#convert