라이프로그


한글 텍스트 파일의 캐릭터셋을 자동으로 판단하는 프로그램 프로그래밍

소스 코드들이 많이 있는 디렉토리가 있다..

내가 작성하는 코드들에 중국어나 일본어가 있으리 만무하지만,

울트라 에디트로 작성한 파일을 많이 저장하다보니...

가끔 서로 다른 캐릭터 셋으로 만들어 놓는 경우가 종종 있다.

윈도에서는 주로

ASCII, EUC-KR, CP-949, UTF-8 등의 캐릭터 셋으로 저장하는데,

가끔 유니코드 텍스트 파일도 BOM 을 넣기도 하고 빼기도 하고 해서,

나도 울트라 에디트로 열어보기 전에는 어떤 캐릭터 셋으로 저장을 해놨는지 헤깔린다.

그래서 그 수많은 파일 중에서 UTF-8 으로 저장된 파을을 찾으려고 했더니 시간이 너무 많이 걸리더라.. ㅋㅋ

인터넷을 뒤져서 캐릭터셋을 자동으로 판별해 주는 코드를 입수해 보려고 노력을 했으나..

문득... 인터넷 뒤지는 시간이나 내가 만드는 시간이나 별반 차이가 없으리라 생각하고..

이틀간 위키를 뒤져가며 각 캐릭터셋의 인코딩 방식을 찾아서 뚝딱뚝딱 코딩을 했는데.. 생각보다 잘 동작 한다. ㅋㅋ

US-ASCII, EUC-KR, MS-949, UTF-8 형태로 된 인코딩을 자동으로 찾아서 판별해 준다..

물론 BOM 이 붙은 넘들은 BOM 만 가지고 판별을 하고 BOM 이 없는 넘들은 인코딩 오토마타의 간략버전으로 판별한다.

US-ASCII ⊂ EUC-KR ⊂ MS-949
US-ASCII ⊂ UTF-8

의 포함 관계는 대충 아시리라 보고..

유닉스 같은 데서는

find . -type f | xargs detectcharset

이런 식으로 하시면 대략 파일들의 캐릭터 셋을 아시리라

detectcharset.zip

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://dmlim.egloos.com/tb/3966342 [도움말]
  • Ephedra lawyers los angeles. 2008/08/31 22:03 #

    Georgia ephedra attorneys. Where to find ephedra. Ephedra smacker. Ephedra liquid gel products. Ephedra.... more

  • Payday loan. 2008/09/01 09:41 #

    No fax payday loan. Payday loan. Payday loan online. Loan payday fax free.... more

  • Instant payday loan. 2008/09/01 10:00 #

    Payday loan.... more

  • Soma side effects. 2008/09/01 10:45 #

    Soma seeds. Soma to florida. Soma. Rise against soma tickets.... more

  • Anal sex photos. 2008/09/01 21:52 #

    Free anal sex movies.... more

  • Buy fioricet online that ships to missouri. 2008/09/02 10:24 #

    Fioricet. Does fioricet show up in blood work. Fioricet online. Long term effects of fioricet. Fioricet phentermine shipping. Buy fioricet.... more

  • Quick cash loan www.thepayloan.com. 2008/09/02 12:12 #

    Unsecured long term cash loan. Does loan officers analyze cash. Cash money payday loan. Fast cash loan oregon. Cash loan. Advance cash loan no job required. Quick cash loan www.thepayloan.com. Cash advance loan wisconsin.... more

  • Cheap xenical online. 2008/09/02 13:17 #

    Xenical canadian without pescription. Xenical hgh phentermine quit smoking detox. Xenical. Cheap xenical online. Xenical purchase. Xenical canadian. Xenical hgh phentermine qu it smoking. Buy xenical not from canada without rx.... more

  • Airline tickets anchorage to misawa japan. 2008/09/02 22:45 #

    Airline tickets. Cheap airline tickets.... more

  • Payday advance loan utah. 2008/09/02 22:50 #

    Payday loan wisconsin. Payday loan wikipedia the free encyclopedia. Payday loan. Nc payday loan laws. Payday loan oregon.... more

  • 1000 cash loan. 2008/09/03 11:17 #

    Cash advance loan illinois. Quick cash loan www.thepayloan.com. Quick cash loan oregon.... more

  • Ambien. 2008/09/03 11:22 #

    Ambien. Ambien cr.... more

  • Hard to annunciate fioricet codeine. 2008/09/03 14:00 #

    How long does fioricet show up in blood work. Fioricet plai pill.... more

  • Reality sex site. 2008/09/03 23:05 #

    Massage reality sex sites. Virtual reality sex simulator full game. Handjob reality sex sites. Reality sex.... more

  • Crush valium to inject. 2008/09/04 00:03 #

    Vicoden valium. Valium forum. Valium side effects. Mexican valium. Buy valium online save wholesale price yep. Valium. Valium causing depression.... more

  • Utracet vs ultram. 2008/09/04 10:44 #

    Ultram. Ultram er. Ultram pain. Ultram withdrawl. Ultram addiction.... more

  • Free ringtones. 2008/09/04 12:24 #

    No subscription ringtones. Free sprint ringtones.... more

  • Xanax while pregnant. 2008/09/04 19:38 #

    Cheap xanax. Buy xanax. No prescription needed purchasing xanax.... more

  • Bad credit cash loan. 2008/09/04 21:31 #

    Cash loan wisconsin. Quick cash loan www.thepayloan.com.... more

  • Soma drug testing. 2008/09/05 22:43 #

    Soma cubes. Soma without prescription. Effects of soma. Buy cheap soma. Soma to florida. Soma. Soma san diego.... more

  • How to make ephedrine. 2008/09/05 22:47 #

    Ephedrine. Ephedrine products. Ephedrine liquid gels. P-ephedrine- guaifen la ta. Hb p-ephedrine guaifen la ta information. Ephedrine hcl. Ephedrine and pregnancy. Addiction to ephedrine.... more

  • Soma online next day. 2008/09/05 23:31 #

    Soma overnight. Soma muscle relaxant. Buy soma online. Soma. Buy domain onlinevcvpl soma. Soma online next day.... more

  • Polyphonic ringtones. 2008/09/06 11:35 #

    Cingular ringtones.... more

  • Propecia. 2008/09/06 11:44 #

    Propecia specifications. Propecia. Reversing the effects of propecia. Generic propecia. Propecia uk medix plus forum. Best price for propecia. Natural herb reverse impotence from propecia. Propecia pill. Buy propecia buy cheap propecia online.... more

  • Cash advance loan illinois. 2008/09/08 18:35 #

    1000 cash loan. Commercial loan cash out. Fast cash loan idaho. No fax instant cash loan. Student cash loan. Quick cash loan www.thepayloan.com.... more

  • Airline tickets. 2008/09/08 21:36 #

    Cheap airline tickets to asia. Airline tickets. Cheap airline tickets.... more

  • Verizon ringtones. 2008/09/09 20:26 #

    Free ringtones. Free christmas ringtones.... more

  • Ringtones. 2008/09/09 21:41 #

    Free ringtones. Free sprint ringtones.... more

  • Propecia buy propecia. 2008/09/10 18:07 #

    Propecia online uk.... more

  • Soma half ironman. 2008/09/10 19:30 #

    Soma next day. Soma cube. Tramadol soma zoloft prozac onlineprescription.md. Soma to florida. Soma.... more

  • About propecia. 2008/09/10 19:59 #

    Propecia online.... more

  • Generic viagra. 2008/09/12 00:32 #

    Viagra. Female viagra. Viagra side effects. Free viagra. Is viagra soft tabs better. Viagra stories. Free sample viagra. India viagra. Viagra without a prescription.... more

  • Amoxicillin rx655. 2008/09/12 00:36 #

    Amoxicillin and clv.... more

  • Airline tickets. 2008/09/12 01:00 #

    Airline tickets. Las vegas airline tickets. Cheap airline tickets.... more

  • Payday loan reviews. 2008/09/13 04:54 #

    Payday loan in ga. Payday loan. Payday loan utah.... more

  • Quick cash loan oregon. 2008/09/13 09:31 #

    Does loan officers analyze cash. Quick cash loan oregon. Quick cash loan www.thepayloan.com. Cash advance loan wisconsin.... more

  • Watson soma. 2008/09/13 09:35 #

    Soma. Soma intimates. Buy soma tablets.... more

  • Ephedra. 2008/09/13 22:16 #

    Ephedra lawyers san diego. Ephedra swarm. Diet pills with ephedra.... more

  • Ringtones. 2008/09/13 22:18 #

    Download ringtones. Free mp3 ringtones. Free nokia ringtones. Ringtones for nextel. Free ringtones. Flyleaf ringtones.... more

  • Motorola ringtones. 2008/09/13 22:21 #

    Cingular ringtones.... more

  • Fioricet 120. 2008/09/14 21:00 #

    Generic fioricet low prices amp fast delivery. Fioricet and blood work.... more

  • Cingular ringtones. 2008/09/14 21:04 #

    Free nokia ringtones. Free ringtones.... more

  • Free virgin mobile ringtones. 2008/09/14 21:38 #

    Free ringtones. Ringtones.... more

  • Liquid ephedra. 2008/09/15 09:37 #

    Ephedra yellow jackets. Ephedra lawyers los angeles.... more

  • Asian sex tours. 2008/09/15 09:42 #

    Asian sex express. Hot asian sex. Asian sex movies. Asian sex.... more

  • Free mobile ringtones. 2008/09/15 10:08 #

    Free ringtones. Verizon ringtones. Free cingular ringtones.... more

  • Start soma. 2008/09/15 21:55 #

    Soma.... more

  • Propecia. 2008/09/15 22:01 #

    Propecia side effects bad. Propecia side effects finasteride.... more

  • Quick cash loan utah. 2008/09/15 23:16 #

    Cash loan mississippi. Cash loan huron. Quick cash loan www.thepayloan.com. Fast cash loan utah.... more

  • Can you overdose a dog with valium. 2008/09/16 10:57 #

    Valium picture. Valium to activan conversion table. Valium.... more

  • Adderall. 2008/09/16 16:49 #

    Adderall idiopathic edema. Adult adhd adderall. Combining adderall and strattera. Adderall. Snort adderall xr. Adderall in mexico.... more

  • Cheap airline tickets. 2008/09/17 02:59 #

    Airline tickets.... more

  • Amoxicillin. 2008/09/17 03:01 #

    Amoxicillin price. Amoxicillin soar throat.... more

  • Ephedra yellow swarm. 2008/09/17 04:43 #

    Ephedra yellow swarm. Ephedra liquid gel products. Hartford ephedra lawyers. Where can i purchase ephedra. Ephedra.... more

  • Fioricet and blood work. 2008/09/18 07:52 #

    Fioricet. Fioricet info. Cheapest fioricet. What is fioricet.... more

  • Free asian sex. 2008/09/19 11:28 #

    Asian free movies sex. Asian ladyboy sex. Asian sex express. Young asian sex.... more

  • Cheap airline tickets. 2008/09/19 23:07 #

    Last minute airline tickets. Airline tickets. Cheap airline tickets.... more

  • Xenical hgh phentermine quit smoking. 2008/09/19 23:12 #

    Xenical hgh phe. Canadian xenical without prescription.... more

  • Airline ticket. 2008/09/20 10:30 #

    Discount airfare cheap airline ticket. Buy cheap airline ticket bloghoster. Washington to dallas airline ticket sale. Airline ticket.... more

  • Order ultram cheap pharmacy. 2008/09/20 12:42 #

    Ultram in mexico. Ultram buy ultram online order cheap ultram. Ultram addiction.... more

  • Honest payday loan. 2008/09/20 23:02 #

    Payday loan. No teletrack payday loan. Instant payday loan. Fast payday loan.... more

  • Big boobs. 2008/09/20 23:27 #

    Vintage big boobs. Big boobs. Free big boobs. Big black boobs.... more

  • Military discount airline ticket. 2008/09/21 07:03 #

    Book airline ticket. Airline ticket auctions. Airline ticket for under 100. One-way airline ticket.... more

  • Airline discount tickets. 2008/09/21 11:30 #

    Airline tickets. Cheap airline tickets.... more

  • Levitra. 2008/09/26 14:27 #

    Cialis levitra. Levitra.... more

  • Buy valium online. 2008/10/07 19:31 #

    Valium online discount valium buy valium. Valium prescription online. Beamto buy link online valium pharmacy forum. Buy valium online.... more

  • Buy phentermine order cheap online. 2008/10/09 04:29 #

    Cheap ... phentermine cod url. Phentermine cheap. Cod phentermine as well as cialis cheap reviews. Buy cheap phentermine best online pharmacy.... more

  • Xanax. 2008/10/13 16:38 #

    Xanax.... more

  • Online pharmacy cost levitra. 2008/10/14 00:39 #

    Levitra viagra cyalis webmd.... more

  • Cash advance loan wisconsin. 2008/10/17 01:53 #

    Fast cash loan wisconsin. Cash advance loan. Quick cash loan. Fast cash loan idaho. Cash advance loan illinois. Cash loan missouri. Quick cash loan www.thepayloan.com. Cash advance loan utah.... more

  • Order xanax online. 2008/10/18 20:42 #

    Buy xanax. Snorting xanax.... more

  • Cheap levitra. 2008/11/30 23:01 #

    Levitra starting from per pill. Levitra.... more

  • Percocet. 2008/12/10 15:13 #

    Buy percocet online. M360 percocet. Percocet. Percocet dependency. Cheap percocet. How long does percocet stay in your system. Benefits of percocet.... more

  • Celexa. 2008/12/10 17:14 #

    Celexa.... more

  • Buy ultram. 2008/12/11 10:13 #

    Buy ultram cheapest site.... more

  • Viagra for women. 2008/12/11 16:31 #

    Buy low price viagra. Viagra. Free sample of viagra. Viagra from canada. Re viagra cello.... more

  • Buy xanax. 2010/11/26 22:12 #

    Buy xanax. Xanax online. Xanax pharmacy online. Xanax. Xanax effect.... more

  • Buy xanax. 2010/11/30 21:32 #

    Buy xanax. Cheap xanax overnight delivery.... more

  • Xanax side effects. 2010/12/24 02:59 #

    Generic xanax 2 mg no prescription. Xanax. Chemical compounds of xanax. Xanax with herbal medicines.... more

  • Xanax side effects. 2010/12/25 03:43 #

    Xanax side effects. Ativan xanax valuim trial pack. Xanax. Xanax addiction.... more

핑백

덧글

  • 하이시커 2007/11/28 19:48 # 답글

    저도 가끔 이런 프로그램이 있었으면 했는데, 이렇게 만들어주시다니.
    감사히 쓰겠습니다.
  • tot 2008/01/04 14:29 # 삭제 답글

    file 이라는 유틸이 있습니다.
    file xxx.txt 하면 캐릭터셋을 뱉어주고
    이미지등 다른종류의 파일정보도 잘 뱉어줍니다.
  • 머리말 2008/02/29 02:22 # 답글

    음... file 이라는 좋은 툴이 있었군요... 역시 사람은 배워야 해..ㅋㅋ 근데 EUC-KR, MS949 는 판별을 못하는 군요..
댓글 입력 영역


끝말잇기