2009-05-13 5 views

Antwort

1

Sie könnten einen gewissen Einfluss bekommen mit 1,9

Encoding.constants.grep/gb/i => [: GB18030,: GBK,: GB1988,: GB12345]

Encoding.constants.grep/big5/i => [: Big5,: BIG5,: Big5_HKSCS,: Big5_HKSCS,: Big5_UAO,: BIG5_UAO]

so ist es so etwas wie

How can I convert a string from windows-1252 to utf-8 in Ruby?

original = File.open ('name', 'r: original_encoding'). Lesen

original.force_encoding ('new_encoding')

Obwohl ich es noch nie versucht habe.

Verwandte Themen