Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can view and save this to a file. In Chrome, I can view source and see the title of the page is 波羅蜜. If I open the saved file in vim to edit, I see question marks for those characters. Then if I :set encoding=gb2312 I will see the first two characters and then question marks. If, instead, I do :e ++enc=gb2312 %:p I will see the middle character.

After the file is open (because I use MacVim and Fetch opens the file for me automatically) what is the correct workflow to edit this file?

share|improve this question

gb2312 only does simplified characters.

Firefox, Mozilla, and python2-chardet-2.0.1 all lie and say this is gb2312, but since it has traditional characters, the charset needed is gb18030.

So: if it looks like a duck, quacks like a duck, smells like a duck, and tastes like a duck... open the file with hexdump and read the codepage definition file.

share|improve this answer

I have vim set to use UTF-8, as as far as I can see the characters correctly. Maybe try

set encoding=utf-8
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .