Created
July 24, 2009 05:38
-
-
Save nagachika/153868 to your computer and use it in GitHub Desktop.
termtter plug-in for euc-jp terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Termtter plugins for EUC-JP terminal. | |
# | |
require "kconv" | |
module ::Readline | |
class << self | |
alias :readline_old :readline | |
end | |
module_function | |
def readline(*args) | |
buf = readline_old(*args) | |
buf.toutf8 | |
end | |
end | |
class << $stdout | |
def write(str) | |
super(str.toeuc) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment