Help us understand the problem. What is going on with this article?

emacs で文字コードをUnicode(UTF-8 or UTF-16)のBOM付きにする

More than 5 years have passed since last update.

EmacsでUnicodeのBOM付きで保存するためのメモ Windows対策です

emacs上で

C-x RET f 

を使い文字コードをutf-8 or utf-16のsignature付きものを指定してから保存する
指定できるのは以下のもの

utf-16be-with-signature
utf-16be-with-signature-dos
utf-16be-with-signature-mac
utf-16be-with-signature-unix
utf-16le-with-signature
utf-16le-with-signature-dos
utf-16le-with-signature-mac
utf-16le-with-signature-unix
utf-8-with-signature
utf-8-with-signature-dos
utf-8-with-signature-mac
utf-8-with-signature-unix

例:

C-x RET f utf-8-with-signature 

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした