Best way to convert text files between character sets?

后端 未结 21 2072
再見小時候
再見小時候 2020-11-22 04:42

What is the fastest, easiest tool or method to convert text files between character sets?

Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa.

相关标签:
21条回答
  • 2020-11-22 05:25

    PHP iconv()

    iconv("UTF-8", "ISO-8859-15", $input);

    0 讨论(0)
  • 2020-11-22 05:28

    Under Linux you can use the very powerful recode command to try and convert between the different charsets as well as any line ending issues. recode -l will show you all of the formats and encodings that the tool can convert between. It is likely to be a VERY long list.

    0 讨论(0)
  • 2020-11-22 05:28

    My favorite tool for this is Jedit (a java based text editor) which has two very convenient features :

    • One which enables the user to reload a text with a different encoding (and, as such, to control visually the result)
    • Another one which enables the user to explicitly choose the encoding (and end of line char) before saving
    0 讨论(0)
提交回复
热议问题