Jump to content
Chinese-Forums
  • Sign Up

how to convert large file (90+ Mb) from gb2312 to utf-8


Guest alexkos

Recommended Posts

Open the file in vi. Type the following commands:

:set encoding=gb2312

:set fileencoding=utf8

:w myfile.utf8

:q

Vi will be using iconv to do the conversions, but it will possibly be doing it line by line so iconv should be able to handle it. Make sure you save to a different filename than the original, just in case something goes wrong and the original 90mb file is lost.

Link to comment
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...