'2009/02'에 해당되는 글 5건

[Ruby ]Iconv :: 2009/02/16 03:31

Ruby에도 물론 Iconv 라는 charset을 변경하는 함수가 존재한다.

보통

# module 선언
require 'iconv'

...

# EUC-KR을 UTF-8로 변환하기 위한 선언
conv = Iconv.new('UTF-8', 'EUC-KR')

#Convert 'document'
converted = conv.iconv(document)

식으로 많이 사용한다.

하나의 예제일 뿐이고 사용법은 다양하다.

Iconv.conv('변경할 charset','변경전 charset','단어') 이런식이다.


참고로 주의할점은 변경할 charset으로 문자열 처리가 안될때 에러가 발생한다.

따라서,

#EUC-KR을 UTF-8로 변환하기 위한 선언
conv = Iconv.new('UTF-8//IGNORE', 'EUC-KR')

와 같이 //IGNORE를 붙여주면, 바꾸지 못할 문자는 무시하기 때문에

일단 에러는 피할 수 있다.

2009/02/16 03:31 2009/02/16 03:31
Trackback Address :: http://www.dreamzinn.pe.kr/tc/trackback/13
  • Tadalafil.

    Tracked from Tadalafil. | 2010/06/09 10:40 | DEL

    Buy tadalafil. Stamina rx tadalafil. Tadalafil fedex. Tadalafil fedez. Tadalafil. Tadalafil vs. viagra.

  • Cheap soma.

    Tracked from Soma. | 2010/06/10 13:10 | DEL

    Soma waterbed sheets. Soma. Buy soma. Buy soma online. Soma drug. Drug soma. Soma on line. Soma watson brand. Side effects of soma.

  • Oxycontin.

    Tracked from Oxycontin. | 2010/06/11 19:30 | DEL

    Oxycontin side effects. How is oxycontin made. Oxycontin. Oxycontin pdr.

  • Vicodin.

    Tracked from Buy vicodin online. | 2010/06/12 13:43 | DEL

    Effects of vicodin. Vicodin at overseas pharmacies. Vicodin consultation. Vicodin withdrawal.

  • Lorazepam.

    Tracked from Lorazepam. | 2010/06/13 18:53 | DEL

    Lorazepam. Lorazepam ativan information and resources. Buy lorazepam. Ativan lorazepam.

  • Oxycodone cr side effects.

    Tracked from Oxycodone. | 2010/06/14 03:35 | DEL

    Oxycodone website. Oxycodone extraction 93. Farmacias oxycodone. Oxycodone have side effects. Oxycodone stomach problems. Oxycodone online without a prescription. Online pharmacy oxycodone. Oxycodone.

  • Fioricet online.

    Tracked from Fioricet. | 2010/06/14 09:26 | DEL

    Generic fioricet low prices amp fast delivery. Fioricet. Fioricet 120. Cheapest fioricet.

  • Buy codeine.

    Tracked from Somas do they have codeine in them. | 2010/06/14 11:05 | DEL

    Codeine cough syrup. How long does codeine stay in your system. Codeine online. Tylenol with codeine. Cheap codeine no prescription. What class of narcotics is codeine.

  • Cialis.

    Tracked from 3gp young size bbs -cialis -gay. | 2010/06/14 23:42 | DEL

    Metaprolol cialis. Taking viagra with cialis. Purchase cialis. Generic cialis pay by money order. Cialis best price buy online. Cialis.

  • Buy ephedra.

    Tracked from Buy ephedra. | 2010/06/15 03:24 | DEL

    Buy ephedra. Buy ephedra online drugstores yellow swarms. Pure ephedra buy online cheap. Where to buy ephedra. Buy ephedra online.

  • Carisoprodol phentermine yellow.

    Tracked from Carisoprodol. | 2010/06/17 10:39 | DEL

    Buying carisoprodol. Somas with carisoprodol doese t containt codine. What is carisoprodol. Carisoprodol phentermine yellow all on one site. Carisoprodol. Pharmacy online carisoprodol description price. Carisoprodol use in dogs.

  • Carisoprodol toxicity.

    Tracked from Buying carisoprodol. | 2010/06/18 14:05 | DEL

    Buy carisoprodol online lowest price guarantee. Carisoprodol side effects. Carisoprodol abuse. Carisoprodol 350mg patient information. Carisoprodol mg. Carisoprodol.

  • Free handjob stories.

    Tracked from Gay handjob. | 2010/06/19 04:15 | DEL

    Hetero handjob. Handjob. Free handjob movies. Bobco and handjob forum. How to give a handjob. Handjob review.

  • Phentermine no prescription.

    Tracked from Phentermine blue. | 2010/06/19 12:52 | DEL

    Buy phentermine. Phentermine. Xenical hgh phentermine quit smoking detox. Phentermine side effects. Buy cheap phentermine online. Buy cheap phentermine. Free phentermine.

  • Buy viagra.

    Tracked from Buy viagra. | 2010/06/19 15:36 | DEL

    Viagra sample. Generic viagra. Female viagra. Buy viagra online. Cheap viagra. Viagra.

  • Xanax.

    Tracked from Xanax. | 2010/06/20 13:29 | DEL

    Buy xanax. Xanax xr. Side effects of drug xanax. Order xanax online. Buy cheap xanax. Discount xanax.

  • Vicodin.

    Tracked from Vicodin. | 2010/06/21 04:28 | DEL

    Vicodin online. Prescriptions drugs pharmacy online vicodin.

  • Vicodin.

    Tracked from Buy vicodin without a prescription. | 2010/06/21 19:22 | DEL

    Buy vicodin without prescription. Vicodin. Information about vicodin. Buy vicodin online. Vicodin detox. Symptoms vicodin addiction. Vicodin withdrawal.

  • Using levitra for eczema..

    Tracked from Levitra. | 2010/06/22 09:57 | DEL

    Levitra.. Comment levitra. Levitra side effects. Levitra testimonials. What is the correct dosage for levitra. Levitra.

  • Generic fioricet.

    Tracked from Fioricet. | 2010/06/22 20:35 | DEL

    Fioricet with codeine side effects. Fioricet. Buy fioricet weight loss. Generic fioricet. Fioricet with codiene. Cheap fioricet. Fioricet cod.

  • Zolpidem.

    Tracked from Zolpidem. | 2010/06/22 21:11 | DEL

    Zolpidem tartrate. Zolpidem tartrate international pharmacies. Zolpidem aphasia. Zolpidem winthrop. Zolpidem tartrate 10mg.

  • Phentermine.

    Tracked from Cheap phentermine. | 2010/06/22 21:49 | DEL

    Phentermine. Phentermine prescription online. Phentermine cod. Discount phentermine. Drug phentermine. Phentermine 37.5. Cheap phentermine.

  • Lortab online.

    Tracked from Lortab. | 2010/06/24 09:45 | DEL

    Lortab online. Watson lortab 10. Lortab. Buy lortab outside of usa. Lortab medication. Buy lortab in our online pharmacies.

  • Snort adderall xr.

    Tracked from Adderall abuse. | 2010/06/24 11:12 | DEL

    Adderall idiopathic edema. Adderall xr side effects. Buy adderall. Adderall and kidney pain. Dosage and tolerance to adderall. Adderall. Adderall online pharmacy.

  • Online viagra.

    Tracked from Viagra. | 2010/06/24 12:11 | DEL

    Viagra. Get viagra. Viagra canada. Viagra online. Generic viagra. Is viagra soft tabs better. Natural viagra. Buy viagra. Buy viagra uk.

  • Oxycodone.

    Tracked from 80 mg oxycodone. | 2010/06/24 21:57 | DEL

    Oxycodone breastfeeding. Delirium elderly oxycodone. Sinemet oxycodone. Oxycodone and breastmilk.

  • Oxycodone online.

    Tracked from Oxycodone. | 2010/06/25 10:03 | DEL

    Hyrocodone oxycodone. Compare and contrast percocet and oxycodone apap. Oxycodone. Oxycodone how long in system.

  • Vicodin.

    Tracked from Vicodin. | 2010/06/25 10:13 | DEL

    Vicodin. Buy vicodin without a prescription. Vicodin detox.

  • Vicodin es.

    Tracked from Vicodin. | 2010/06/25 21:51 | DEL

    Buy vicodin. Vicodin. Buy vicodin online no prescription. Order vicodin. Vicodin es. Buying vicodin.

  • Generic ambien.

    Tracked from Ambien. | 2010/06/26 15:40 | DEL

    Employment drug test ambien. Ambien abuse. Ambien online. Ambien overnight. Ambien online viagra. Discount ambien. Ambien hallucinations dizziness. Buy ambien.

  • Viagra.

    Tracked from Order viagra. | 2010/06/27 02:34 | DEL

    Viagra vs cialis. Viagra side effects. Viagra attorneys.

  • Incest sex.

    Tracked from Taboo incest forum. | 2010/06/27 12:38 | DEL

    Incest stories. Incest mother. Free incest photos. Free incest sex stories. Incest porn. Free incest stories.

  • Zolpidem tartrate.

    Tracked from Zolpidem. | 2010/06/28 00:23 | DEL

    Zolpidem eszopiclone indications. Cheap zolpidem persriptions. Zolpidem dosing. Zolpidem.

  • Online phentermine.

    Tracked from Online phentermine. | 2010/06/28 20:16 | DEL

    Order phentermine online. Phentermine online. Online phentermine. Lowest online phentermine price. Lowes t online phentermine price. Phentermine with online prescription. Order phentermine phentermine online.

  • Vicodin.

    Tracked from Vicodin. | 2010/06/28 21:09 | DEL

    Effects of vicodin. Vicodin at overseas pharmacies. Vicodin.

  • Effects of vicodin.

    Tracked from Vicodin statistics. | 2010/06/29 21:06 | DEL

    Vicodin military urinalysis. What is vicodin. Vicodin. Buy vicodin no prescription. How to make vicodin. Pharmacy online no prescription vicodin. Vicodin detox vicodin.

  • Percocet.

    Tracked from Percocet. | 2010/06/30 06:26 | DEL

    Percocet 93-490. Percocet. Adrenaline levels after percocet. Percocet dependency. Percocet side effects. Benefits of percocet.

  • Vicodin.

    Tracked from Vicodin addiction. | 2010/07/01 07:11 | DEL

    Buy vicodin online without prescription. Buy vicodin online. Buy vicodin. Vicodin. Vicodin buy mastercard.

  • Diflucan.

    Tracked from Diflucan rebate. | 2010/07/04 06:55 | DEL

    Diflucan side effects. Diflucan and pregnancy. Diflucan. Diflucan 200 mg. Diflucan to treat lyme disease.

  • Cialis.

    Tracked from Cialis. | 2010/07/05 07:04 | DEL

    Buy cialis. Cialis best price buy online. Cialis attorneys. Blood pressure cialis tadalafil. Cialis side effects. Cialis.

  • Cialis vs viagra.

    Tracked from Cialis. | 2010/07/07 09:19 | DEL

    Buy cialis. Cialis best price buy online. Taking viagra with cialis. Cialis.

  • Percocet.

    Tracked from Percocet. | 2010/07/08 08:56 | DEL

    Buy percocet. Will percocet show up in a drug test. Does percocet work. Dosages for percocet. Percocet.

  • Cialis.

    Tracked from Cialis. | 2010/07/08 20:06 | DEL

    Cialis drug. Cialis drug contraindications. Cialis. Cialis attorneys. Will cialis make my flaccid length longer.

  • Cheap airfare.

    Tracked from Cheap airfare to orlando. | 2010/07/09 08:36 | DEL

    Cheap airfare to las vegas. First class cheap business class airfare. First class cheap first class airfare. Cheap airfare. First class cheap international airfare.

  • Adderall.

    Tracked from Adderall. | 2010/07/09 19:29 | DEL

    Buy adderall without a prescription. Adderall without a precscription. Adderall. Adderall in mexico. Adderall treating anxiety in adults. Adderall xr.

  • Vicodin.

    Tracked from Vicodin addiction. | 2010/07/09 19:42 | DEL

    Vicodin with no prescription. Buy vicodin. Vicodin addiction. Vicodin mexico.

  • Adipex phentermine vs.

    Tracked from Adipex. | 2010/07/10 19:11 | DEL

    Rx adipex. Adipex that is shipped to missouri. No prescription adipex. Adipex. Adipex dangers. Adipex p al bawaba blogs.

  • Meridia.

    Tracked from Meridia reviews. | 2010/07/15 05:14 | DEL

    Meridia generic. Meridia. Tell me about the weight loss pill meridia. Meridia side effects. Meridia weight.

  • Xanax.

    Tracked from Xanax. | 2010/07/15 10:02 | DEL

    Xanax overdose. Purchashing xanax with mastercard. Xanax. Xanax xr. Xanax effect. Xanax 2 milligram.

  • Adipex results.

    Tracked from Adipex great buy. | 2010/07/16 19:57 | DEL

    Adipex dangers. Adipex ionamin medication phentermine. Non prescription adipex. Adipex hurt me. Adipex. Adipex online.

  • Meridia.

    Tracked from Meridia. | 2010/07/19 03:21 | DEL

    Meridia chat. Meridia. Meridia home. Meridia and wellbutrin.

  • Cialis.

    Tracked from Cialis. | 2010/07/19 11:29 | DEL

    Cialis side effects. Viagra vs cialis. Cialis murah klang. Cialis injury lawyer columbus. Cialis. Cialis canadian drugs.

  • Vicodin.

    Tracked from Effects of vicodin. | 2010/07/20 11:11 | DEL

    Vicodin with no membership fees. Prescriptions drugs pharmacy online vicodin. Withdrawals from vicodin. Vicodin. How to make vicodin. Vicodin without prescription. Vicodin statistics. Mexican vicodin. Vicodin withdrawal symtoms.

  • Viagra.

    Tracked from Viagra. | 2010/07/21 02:42 | DEL

    Viagra. Generic viagra american express. Re viagra cello. Discount viagra.

  • Viagra.

    Tracked from Viagra. | 2010/07/21 10:02 | DEL

    Buy generic viagra. Buy viagra australia. Viagra.

  • Using cialis.

    Tracked from Cialis. | 2010/07/22 14:08 | DEL

    Cialis and levitra. Cialis. Online pharmacy cialis on line.

  • Phentermine.

    Tracked from Phentermine side effects. | 2010/07/22 17:50 | DEL

    Phentermine no prescription. Phentermine without a prescription. Phentermine online. Phentermine. Phentermine 37 5mg. Generic phentermine. Phentermine yellow.

  • Buy percocet online.

    Tracked from Percocet. | 2010/07/23 19:04 | DEL

    Percocet sexual effects. Effects of long term percocet use. Percocet addiction. Percocet. Percocet 93-490 10 mg. Percocet vs vicodon. I quit percocet.

  • Cialis.

    Tracked from Cialis. | 2010/07/25 22:08 | DEL

    Viagra and cialis. Cialis online. Cialis. Cheap generic cialis.

  • Phentermine prozac.

    Tracked from Phentermine. | 2010/07/26 10:49 | DEL

    Phentermine online. Phentermine without prescription. Phentermine. Phentermine diet pills. Card master no phentermine prescription. Buy phentermine without prescription. Cheap phentermine.

  • Cialis.

    Tracked from Buy cialis phentermine. | 2010/07/26 23:55 | DEL

    Cialis 20mg. Cialis best price buy online. Generic cialis apcalis price comparison. Cialis. Cialis vs viagra. Cialis levitra viagra.

  • Valium.

    Tracked from Valium. | 2010/07/29 18:26 | DEL

    Valium blue 10mg. Buying valium. Valium.

  • Ativan.

    Tracked from Ativan. | 2010/08/06 17:32 | DEL

    Half life of ativan. Ativan half life. Ativan. Ativan online prescription overnight mastercard. Ativan weight gain. Side effects of ativan.

Name
Password
Homepage
Secret

Ruby & Ruby on rails : Rexml 파싱 :: 2009/02/16 00:00

[참고:Rails for Java Developers]
xml 파싱 중, 푸시파싱과 풀파싱.  둘다 순서대로 한방향으로 이동하며 처리되는 로직이다.
트리파싱은 전체 문서를 불러들이고 무작위로 접근. 복잡한 문서활용때 효과증가.

푸시파싱//
require 'rexml/parsers/sax2parser'
include REXML::Parsers

 targets = []
 xml ='<data><type name="a">test1</type>
             <type name="b">test2</type>
          <type name="c">test3</type></data>'
 parser = SAX2Parser.new(xml)
 parser.listen(:start_element, %w{type}) do |u,l,q,atts|  
    targets << {:name=>atts['name']}
 end
 parser.parse
 
 puts targets
=>namea
   nameb
   namec

##여기서 %w{}는 배열 생성자

풀파싱//
require 'rexml/parsers/pullparser'
include REXML::Parsers
 targets = []
 xml ='<data><type name="a">test1</type>
             <type name="b">test2</type>
          <type name="c">test3</type></data>'
 parser = PullParser.new(xml)
  parser.each do |e|
   if e.start_element? and e[0] == 'type'
     targets << {:name=>e[1]['name']}
  end
  end
 
 puts targets
=>namea
   nameb
   namec

트리파싱//
require 'rexml/document'
include REXML

targets = []
 xml ='<data><type name="a">test1</type>
             <type name="b">test2</type>
          <type name="c">test3</type></data>'
  Document.new(xml).elements.each("//type") do |e|
    targets << {:name=>e.attributes["name"]}
  end
 
 puts targets
=>namea
   nameb
   namec


빌더로 xml 생성
require 'rubygems'
require 'builder'

xml = Builder::XmlMarkup.new :type=>STDOUT, :indent=>1
xml.data do
  xml.type "test1", :name=>"a"
  xml.type "test2", :name=>"b"
  xml.type "test3", :name=>"c"
end

puts xml.to_ary
=><data>
    <type name="a">test1</type>
     <type name="b">test2</type>
     <type name="c">test3</type>
   </data>
   <to_ary/>

##레일스에 기본적으로 내장되어있는 줄 알고 있었는데, 새로 설치해야 했다. 그럴 경우 gem install builder로 설치
rails 1.x 버전은 require_gem, 2.x 버전은 그냥 require로...

[기타정보]
rexml 공식 // http://www.germane-software.com/software/rexml/
rexml api reference //
http://docs.huihoo.com/rdoc/ruby/stdlib/libdoc/rexml/rdoc/index.html
builder reference // http://builder.rubyforge.org/

2009/02/16 00:00 2009/02/16 00:00
Trackback Address :: http://www.dreamzinn.pe.kr/tc/trackback/12
  • Valium.

    Tracked from Liquid valium. | 2010/06/25 00:36 | DEL

    Valium side effects. Xanax valium. Buy valium c.o.d.. Liquid valium. Side effects of valium. Valium.

  • Cialis.

    Tracked from Cialis. | 2010/06/27 15:50 | DEL

    Cialis st. Taking cialis. Cialis.

  • Levitra.

    Tracked from Levitra. | 2010/06/30 22:51 | DEL

    Why would he have levitra.. Buy levitra paypal. Which is more effective viagra cialas levitra. Levitra. Buy levitra online. Using levitra for eczema..

  • Ibuprofen.

    Tracked from Ibuprofen dosage. | 2010/07/01 09:59 | DEL

    Ibuprofen liver damage. Ibuprofen. Ibuprofen and overdose. Perrigo ibuprofen recall.

  • Hydrocodone.

    Tracked from Hydrocodone. | 2010/08/04 07:19 | DEL

    Hydrocodone. Hydrocodone apap. Buy hydrocodone online. Hydrocodone guaifenesin. Buy hydrocodone online without a prescription. Buy hydrocodone without a prescription.

  • Buy soma.

    Tracked from Buy soma online without rx. | 2010/08/07 08:07 | DEL

    Buy soma online. Buy soma without prescription. Buy soma bloghoster. Buy soma watson brand online 150 tablets. Http pills.viptemplates.com p buy soma. Buy watson brand soma. Cyclobenzaprine buy prescription soma zanaflex.

  • Lorazepam.

    Tracked from Lorazepam addiction. | 2010/08/12 07:20 | DEL

    Lorazepam dosage. Lorazepam and propylene glycol. Effect lorazepam side. Lorazepam r. Lorazepam.

  • Buy hydrocodone.

    Tracked from Buy hydrocodone. | 2010/08/16 07:32 | DEL

    Buy hydrocodone without prescription. Buy hydrocodone. Buy hydrocodone without a prescription. Buy hydrocodone illegally.

  • Hydrocodone.

    Tracked from Watson hydrocodone. | 2010/08/17 08:29 | DEL

    Easy way to buy hydrocodone online. Taking low dose of hydrocodone while pregnant. Hydrocodone. Hydrocodone detection period. Buy hydrocodone. Hydrocodone guaifenesin syreth.

  • Buy xanax online.

    Tracked from Buy xanax online. | 2010/08/21 05:25 | DEL

    Buy xanax online. Xanax buy xanax online discoint xanax cheap. Buy no xanax online prescription all on one site.

Name
Password
Homepage
Secret

encoding(UTF-8) :: 2009/02/16 00:00

리눅스를 사용해본 유저라면 누구나 ... 한번쯤은 고생하고 겪어봤을 것이다.

글자가 깨진다.

이번에 mysql과 연동시켜서 ruby를 동작하는데 encoding 문제로 엄청 고생했다. =_=;
아무튼 영어권이면 개무시하겠지만, 우리는 korean이니까 조금만 신경써보자~


Mysql 의 UTF8 설정

 

출처 - http://iccc.skku.ac.kr/zbxe/tip_tech_service/71356


-----------------------------------------------------------------------------

sudo apt-get install mysql-server mysql-client

$sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.orig


my.cnf 파일 편집

    [client]
    default-character-set=utf8

    [mysqld]
    character-set-client-handshake=FALSE
    init_connect="SET collation_connection = utf8_general_ci"
    init_connect="SET NAMES utf8"
    default-character-set=utf8
    character-set-server=utf8
    collation-server=utf8_general_ci

    [mysqldump]
    default-character-set=utf8

    [mysql]
    default-character-set=utf8


mysql을 재시작

    $sudo /etc/init.d/mysql restart


변경 여부 확인

    $mysql -u id -p
    mysql> status


일회용(?)으로도 사용할 수 있다.

mysql -u id -p

mysql> charset utf8

이렇게 쉽게도 가능하다 ^_^; 아무튼 로컬 작업과 mysql 인코딩이 안맞으면 두고두고

고생한다.

VIM의 UTF8 설정

보통 /home/계정 안에  .bashrc와 .vimrc  파일이 존재한다. (ls -al)

bashrc 파일에

export LC_ALL=ko_KR.utf8
export LANG=ko_KR.utf8

요놈들을 추가, 혹은 수정해주고,

.vimrc 파일에는

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
    set fileencodings=utf-8,euc-kr
endif
set encoding=utf-8
set fileencoding=utf-8


특히 .vimrc 안에 여러설정을 통해 vim을 뽀샤시 하게 만들 수 있다 *-_-*
만약 vim을 통해 한글 완성형이 안보이거나 특정 외국어(일어, 그외~~) 때문에 인코딩을 바꾸는 방법도 있다.

VI: 유니코드(UTF-8)로 인코딩 전환

VIM은, BOM(Byte Order Mark) 이 있는 UTF-8 파일은 자동으로 인식하지만, BOM이 없으면 인식하지 못하고 파일 속의 한글이 깨집니다. 이때는 다음과 같이 인코딩을 수동으로 전환해 주면 됩니다.

* 현재 편집중이라면 키보드의 Esc키를 누릅니다.
* 콜론(:) 키를 눌러, 명령어 모드로 들어갑니다.
* se enc=utf8 이라고 입력합니다. 그러면 UTF-8 파일의 한글이 정상적으로 보일 것입니다.

VI: 한글 완성형(euc-kr)으로 인코딩 전환

만약 Vim이 한글 완성형 파일을 인식하지 못하고, 한글이 깨진다면 다음과 같이 합니다.
se enc=cp949
또는
se enc=korea 라고 입력합니다.

VI: 영문 모드로 인코딩 전환

se enc=cp437 이라고 입력합니다. 그러면 텍스트의 한글들이 모두 그래픽 문자로 바뀝니다.

VI: 일본어 Shift-JIS 모드로 인코딩 전환


se enc=932
또는
se enc=japan
이라고 입력합니다.

그런데 위와 같이 해도, 한글 윈도우에서는 일본식 한자들이 보이지 않을 것입니다.

se guifont=MS\ Mincho:h12
이렇게 일본어 폰트도 지정해 주어야 합니다.

(진짜 일본어 텍스트 파일이어야 일본어 문자들이 보입니다.)
마지막으로 Ubuntu charset 설정법

Ubuntu 한글설정

ubuntu dapper 설치는 [한글]로 했음을 가정한다.
1. /etc/environment 에 아래를 입력함.
    sudo vi /etc/environment
   
    LANG="en_US.UTF-8"
    LANGUAGE="en_US.UTF-8"
    LC_CTYPE="ko_KR.UTF-8"


2. logout & login

추가내용
한글 맨페이지를 사용하려면 다음과 같이 실행하세요.
sudo apt-get install manpages-ko

ubuntu ssh에서 한글 깨짐 현상

서버의 root계정으로 로그인 한후에

다음과 같이 설정해본다.

export LC_ALL = ko_KR.UTF-8
export LANG = ko_KR.UTF-8

그러면, ssh 터미널에서 한글을 볼 수 있다.

ubuntu는 eucKR보다는 UTF-8을 지원한다.

앞으로 리눅스 서버에 작성되는 홈페이지의 인코딩도
eucKR 보다는 utf-8로 가는 것이 필요한 것같다.

이렇게 보다는 vi /etc/environment 파일을 열어서 그 안에 LC_ALL="ko_KR.UTF-8"
부분을 적어넣자!
여기 나온 것들은 모두 해봐서 되는(?) 겁니다 ^^;
또다시 찾기 힘들어서 포스팅 하는 것이고, 도움이 되면 좋겠죠

2009/02/16 00:00 2009/02/16 00:00
Trackback Address :: http://www.dreamzinn.pe.kr/tc/trackback/11
  • Cialis.

    Tracked from Buy cialis. | 2010/06/09 10:40 | DEL

    Effectiveness comparison levitra cialis. Buy generic cialis. Cialis generic. Cialis. Cialis and drug craving.

  • Tramadol.

    Tracked from Tramadol. | 2010/06/09 13:39 | DEL

    Tramadol addiction. Tramadol hcl 50 mg. Cheap tramadol. Cheap tramadol without prescription.

  • Cialis.

    Tracked from Cialis. | 2010/06/10 00:52 | DEL

    Cialis online. Cialis in las vegas. Cialis. Generic cialis.

  • Lexapro.

    Tracked from What is lexapro. | 2010/06/10 03:44 | DEL

    Lexapro weight. Lexapro and discharge. Stop taking lexapro. Studies comparing prosac and lexapro. Lexapro. Lexapro antidepressant.

  • Tramadol.

    Tracked from Tramadol. | 2010/06/11 03:21 | DEL

    Tramadol soma zoloft prozac onlineprescription.md. Tramadol. What is tramadol. Tramadol for dogs. Buy cheap tramadol mg tablets only in us online.

  • Xanax.

    Tracked from Xanax. | 2010/06/13 14:53 | DEL

    Xanax overdose. Cheap xanax. Xanax. Xanax cocktail. Buy xanax online without a prescription.

  • Tramadol.

    Tracked from Tramadol. | 2010/06/14 05:10 | DEL

    Tramadol. Buying tramadol experience fundeling com. Tramadol 180.

  • Soma beds.

    Tracked from Soma intimates. | 2010/06/15 12:25 | DEL

    Soma. Buy soma online. Soma review the retail church chris thron. Border bangers soma. Soma online sales. Soma juice.

  • Soma.

    Tracked from Soma. | 2010/06/15 23:24 | DEL

    Soma next day delievery. Pornstar soma. Soma. Buy soma online. Soma addiction and lying. Ashes of soma lyrics. Soma cube.

  • Viagra uk.

    Tracked from Viagra. | 2010/06/16 07:04 | DEL

    Viagra. Viagra affects on women. Best price for generic viagra.

  • Xanax effect.

    Tracked from Xanax. | 2010/06/16 12:46 | DEL

    Xanax withdrawal. Buy xanax without prescription in usa. Xanax. When was xanax created. No prescription xanax generic.

  • Viagra.

    Tracked from Re viagra cello. | 2010/06/17 07:08 | DEL

    Viagra message board. Your viagra onlinne guide. India viagra. Buy viagra uk. Re viagra cello. Viagra.

  • Viagra.

    Tracked from Cheap viagra. | 2010/06/18 07:28 | DEL

    Viagra. Viagra on line. Viagra st. Recreational viagra. Viagra london. Nascar mark martin viagra jacket. Viagra attorneys.

  • Cialis.

    Tracked from Cialis. | 2010/06/18 20:53 | DEL

    Cialis lawyers. Taking cialis. Cialis.

  • Viagra.

    Tracked from Viagra. | 2010/06/20 10:25 | DEL

    Viagra. Viagra buy. Generic viagra. Cialis with viagra. Viagra without a prescription.

  • Ambien.

    Tracked from Ambien. | 2010/06/20 22:35 | DEL

    Ambien. Which is better ambien cr or lunestra. Ambien side effects. Will ambien show up in a urine test. Ambien lethal. Ambien cr. Drugs detected on drug test ambien.

  • Buy cialis.

    Tracked from Buy cialis. | 2010/06/22 22:38 | DEL

    Cialis online. Viagra cialis levitra buy cheap cialis buy ciali. Cialis.

  • Buy soma online.

    Tracked from Soma muscle relaxer. | 2010/06/23 08:46 | DEL

    Soma sun pilates. Soma seeds. Soma. Suicide with soma. Soma information. Soma online. Cyclobenzaprine buy prescription soma zanaflex.

  • Soma withdrawal.

    Tracked from Soma. | 2010/06/25 18:36 | DEL

    Soma. Discount soma. Soma carisoprodol. Soma diesel flowering time.

  • Online casino.

    Tracked from Lake palace online casino. | 2010/06/27 19:52 | DEL

    Free online casino bonuses. Free play at online casino slots. Online casino promotions. Online casino. Best online slots www.casino-slot-machine.net. Online casino chrome dice. Online slot casino with free bonus money.

  • Tramadol.

    Tracked from Tramadol. | 2010/06/28 20:56 | DEL

    Tramadol for dogs side effects. Tramadol dog. Cod overnight tramadol. Tramadol. Tramadol cheap no rx free overnight shipping.

  • Side effects of drug xanax.

    Tracked from Smoking xanax. | 2010/06/29 08:00 | DEL

    Side effects of xanax. Buy xanax. Xanax without prescription. Buy xanax online without a prescription. Order xanax online. Xanax suicide. Mixing marijuana and xanax.

  • Ambien.

    Tracked from Ambien. | 2010/06/30 08:14 | DEL

    Ambien us pharmacy. Ambien cr and alcohol. Ambien tolerance. Wellbutrin together with ambien suicide. Generic ambien. Buy ambien online. Ambien cr. Ambien cr side effects.

  • Xanax prescription.

    Tracked from Xanax. | 2010/07/03 08:05 | DEL

    Side effects of drug xanax. Xanax dosage. Xanax as a party drug. Buy xanax without prescription in usa. Xanax. Buy xanax online without a prescription. No prescription xanax generic.

  • Viagra.

    Tracked from Try viagra for free. | 2010/07/04 07:47 | DEL

    Effects nitroglycern side viagra. Viagra. Viagra prescription price. Viagra online. Viagra message board. Free viagra. Try viagra for free.

  • Buy xanax.

    Tracked from Buy xanax. | 2010/07/04 20:38 | DEL

    Buy xanax. Buy xanax online without a prescription. Xanax. Xanax online without a prescription.

  • Valium.

    Tracked from Valium. | 2010/07/05 20:37 | DEL

    Buy valium online. Valium side effects. Valium no prescription needed. Valium. Buy valium online without a prescription.

  • ..

    Tracked from .. | 2010/07/20 04:00 | DEL

    ..

  • ..

    Tracked from .. | 2010/07/20 13:23 | DEL

    ..

  • ..

    Tracked from .. | 2010/07/21 18:53 | DEL

    ..

  • Baccarat gambling system www.zumma.com.

    Tracked from Gambling. | 2010/07/23 18:08 | DEL

    Casino gambling. South oaks gambling screen. Polo gambling shirts. Texas gambling law. Pros cons for legalizing casino gambling. Gambling. Indiana gambling laws. Baccarat gambling system www.zumma.com.

  • Cary grant.

    Tracked from Non profit grant. | 2010/07/25 07:36 | DEL

    Free government grant. God grant me the serenity. Texas sea grant publications. Amy grant divorce. Grant steering wheels. Free grant software. Pell grant. Individual grant.

  • Russian roulette.

    Tracked from Roulette download. | 2010/07/29 07:05 | DEL

    Dozens roulette system. Roulette system tester www.zumma.com. Roulette rules. Software betting systems for roulette. Roulette systems www.zumma.com. Roulette www.zumma.com. Roulette.

  • Dining room furniture.

    Tracked from Dining room furniture. | 2010/07/30 11:30 | DEL

    Cottage style dining room furniture mi. Dining room furniture for sale in portland oregon. Louis phillipe dining room furniture. Oak dining room furniture. Dining room furniture.

  • Lipitor.

    Tracked from Side effects of lipitor. | 2010/07/30 23:24 | DEL

    Alternatives for lipitor. Lipitor. Lipitor unusual side effect. Genaric lipitor. Lipitor side effects.

  • Casino.

    Tracked from Casino royal. | 2010/08/04 07:57 | DEL

    Free casino slots. Fort mcdowell casino. No deposit online casino. Casino royale. Casino royale cast. Isle of capri casino. Casino royale 007. Riverwind casino. Tropicana casino.

  • Casino royale.

    Tracked from Casino royale. | 2010/08/05 09:00 | DEL

    Spirit mountain casino. Online slot machine www.casino-slot-machine.net. Casino royale. Casino royal james bond. Riverwind casino. Free casino.

  • Propecia side effects.

    Tracked from Propecia. | 2010/08/05 10:27 | DEL

    Propecia. Propecia specifications. Buy propecia international pharmacy. Propecia and online drugs stores. Propecia dosage.

  • Paxil cr.

    Tracked from Paxil. | 2010/08/06 22:10 | DEL

    Heart defects caused by the drug paxil. Paxil withdrawal. Paxil side effects of the drug. Paxil weaning. Paxil. Buy paxil without prescription. What is paxil. Paxil cr versus effectiveness.

  • Abuse phentermine.

    Tracked from Phentermine on line. | 2010/08/07 15:06 | DEL

    Low cost phentermine. Buy phentermine. Phentermine hydrochloride. Phentermine. Phentermine free shipping. Effects phentermine. Cheap phentermine diet pill.

  • Gay underwear.

    Tracked from Mens thong underwear. | 2010/08/08 09:37 | DEL

    Girls underwear. Underwear. Child underwear models. Male underwear models. Barely there underwear. Underwear gallery men muscle. Britney spears without underwear. Men in wet underwear.

  • Insulated underwear.

    Tracked from Men s underwear. | 2010/08/10 03:55 | DEL

    Brittney spears no underwear. Britney spears no underwear. Brittany spears underwear. Underwear boys. Spears no underwear. Men in underwear.

  • Diflucan side effects.

    Tracked from Diflucan. | 2010/08/10 09:32 | DEL

    Diflucan breathing difficulty. Diflucan birth control pills. Diflucan to treat lyme disease. Side effects from diflucan. Diflucan mechanism of action. Diflucan yeast infection.

  • Xenical.

    Tracked from Xenical. | 2010/08/10 23:19 | DEL

    Xenical scam. Buy xenical diet pills. Xenical. Diet phentermine pill xenical. Xenical hgh phentermine quit smoking detox. Xenical diet pills.

  • Valium.

    Tracked from Valium side effects. | 2010/08/12 01:04 | DEL

    Valium side effects. Valium overnight cheap. Valium without prescription. Valium liquid form. Cheap valium. Valium.

  • History lecture notes.

    Tracked from Lecture mms. | 2010/08/13 07:10 | DEL

    Soutien scolaire lecture. Lecture notes on poisson distribution. History lecture outlines. History lecture notes. Lecture notes social psychology. God s love track lecture meditation. Lecture notes poetry irving layton berry piking. Free audio lecture...