Regarding this part:
When I convert it to UTF-8 without bom and close file, the file is again ANSI when I reopen.
The easiest solution is to avoid the problem entirely by properly configuring Notepad++.
Try Settings
-> Preferences
-> New document
-> Encoding
-> choose UTF-8
without BOM, and check Apply to opened ANSI files
.
That way all the opened ANSI files will be treated as UTF-8 without BOM.
For explanation what's going on, read the comments below this answer.
To fully learn about Unicode and UTF-8, read this excellent article from Joel Spolsky.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…