Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UCS-2 リトル エンディアンでエンコードされた csv ファイルがあり、これを UTF-8 でエンコードされた MySQL テーブル (デフォルトの照合順序) にアップロードしたいと考えています。最善のアプローチが何であるかについて興味があります。スクリプトを書く必要がある場合は、それを行うことができますが、簡単な解決策があることを願っています!
ありがとう、AFrieze
recode
recode ucs2..utf8 thefile.csv
次にmysqlimport --default-character-set utf8 ...(通常のもの)
mysqlimport --default-character-set utf8 ...