ロリポップのSSH接続でviの文字化けを解消する

このエントリーをはてなブックマークに追加

低価格大容量でナウなヤングに人気のレンタルサーバー、ロリポップ。
チカッパプランでは、SSH接続もできて便利そうなので試しに借りてみました。

レンタルサーバー会社によっては、SSH接続はできても使えるコマンドが厳しく制限されていたり、公開鍵認証が使えなかったりと、思うように使えないこともよくあります。(最近だとサーバーカウボーイがそうだった)
ロリポップは、2週間のお試し期間があるのでその点安心です。公開鍵認証もGitも使えるので、正式利用することにしました。

が、ファイルを編集してみようとすると日本語部分が文字化けします。
どうやら、サーバーのエンコーディングがEuc-JPになっているようです。
WordPressを始め、最近のWebアプリ事情はUTF-8が基本なので、ここもそれに合わせましょう。

ログインしたところ、ユーザーのホームディレクトリに、.vimrcを新しく設置します。

$ vi .vimrc
syntax on
set nobackup
set termencoding=utf-8
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=iso-2022-jp,euc-jp,utf-8,ucs2le,ucs-2

これでファイルの編集、保存も問題なくできるようになりました。

ロリポップのSSH接続でviの文字化けを解消する」への38件のフィードバック

  1. ピンバック: エックスサーバーにインストールした vim が文字化けする場合の対処法 | MacBook Air とWordPressでこうなった

  2. you could look here

    I simply want to say I am very new to blogs and absolutely liked you’re blog site. Almost certainly I’m want to bookmark your site . You amazingly have outstanding writings. Thank you for sharing with us your website.

    返信
  3. Todd Snively

    It’s really a great and helpful piece of info. I’m glad that you shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.

    返信
  4. Margaretta Lenz

    I’m very pleased to uncover this great site. I need to to thank you for your time just for this wonderful read!! I definitely appreciated every part of it and I have you saved to fav to look at new things in your website.

    返信
  5. Love Irrigation

    A fascinating discussion is worth comment. I do believe that you ought to write more about this topic, it may not be a taboo subject but usually folks don’t talk about such issues. To the next! Kind regards!

    返信
  6. Hee Bachan

    Gday here, just started to be mindful of your wordpress bog through The Big G, and have found that it is very beneficial. I will be grateful should you continue this informative article.

    返信
  7. Jule Moyer

    Howdy! This post could not be written much better! Going through this post reminds me of my previous roommate! He always kept preaching about this. I’ll forward this article to him. Pretty sure he’ll have a good read. Many thanks for sharing!

    返信
  8. my link

    I just want to tell you that I am just beginner to blogging and definitely enjoyed you’re web blog. Likely I’m want to bookmark your blog post . You amazingly have very good articles and reviews. Many thanks for sharing your web site.

    返信
  9. viagra

    Great web site you have got here.. It’s hard to find quality writing like yours nowadays. I truly appreciate people like you! Take care!!

    返信
  10. viagra

    A fascinating discussion is definitely worth comment. I think that you should publish more about this issue, it may not be a taboo subject but usually people don’t speak about these topics. To the next! Kind regards.

    返信
  11. Lynn Gildemeister

    An intriguing discussion is worth comment. There’s no doubt that that you need to publish more on this subject matter, it might not be a taboo subject but generally people don’t discuss these topics. To the next! Cheers!

    返信
  12. hotmail iniciar sesion

    Nice post. I learn something new and challenging on websites I stumbleupon everyday. It will always be exciting to read through articles from other authors and use a little something from their web sites.

    返信
  13. Nylander Fashion House

    I’m impressed, I must say. Rarely do I come across a blog that’s both educative and entertaining, and let me tell you, you’ve hit the nail on the head. The problem is an issue that too few people are speaking intelligently about. I am very happy that I came across this in my hunt for something regarding this.

    返信
  14. Metroclick

    You’ll find it near unthinkable to find well-advised men and women on this area, fortunately you appear like you fully understand those things you’re posting on! Many Thanks

    返信
  15. Fastandy

    I need to to thank you for this fantastic read!! I certainly enjoyed every bit of it. I’ve got you book-marked to check out new things you post…

    返信
  16. Elle Blonde

    Howdy, I do think your blog could possibly be having internet browser compatibility issues. When I take a look at your site in Safari, it looks fine but when opening in IE, it has some overlapping issues. I just wanted to provide you with a quick heads up! Other than that, fantastic website!

    返信
  17. Love Irrigation

    Hi, I do think this is a great site. I stumbledupon it ;) I will revisit once again since i have bookmarked it. Money and freedom is the best way to change, may you be rich and continue to help others.

    返信
  18. Shaun Honnette

    It’s appropriate opportunity to create some preparations for the possible future. I have looked over this posting and if I could, I desire to suggest you some significant recommendation.

    返信
  19. Clayton Caraveo

    I was extremely pleased to uncover this great site. I want to to thank you for your time just for this fantastic read!! I definitely enjoyed every bit of it and I have you saved to fav to check out new information on your blog.

    返信
  20. Aldo Bielser

    Hello here, just turned out to be aware of your article through Bing and yahoo, and discovered that it’s seriously informational. I’ll take pleasure in should you maintain this approach.

    返信
  21. Best Massage Gun

    I was very happy to discover this web site. I need to to thank you for ones time due to this wonderful read!! I definitely appreciated every bit of it and I have you saved as a favorite to look at new stuff in your blog.

    返信
  22. shop wise

    Excellent blog you have here.. It’s difficult to find good quality writing like yours nowadays. I seriously appreciate people like you! Take care!!

    返信
  23. cbd oil

    You’re so cool! I don’t believe I have read a single thing like this before. So nice to find someone with some genuine thoughts on this topic. Really.. thanks for starting this up. This website is one thing that is required on the internet, someone with a bit of originality.

    返信

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>