SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

euc2html

By, "Jordan Husney" <jordanh@remotepoint.com>, (c) 2001 and distributed under the GNU Public License.

This is a really simple application that processes files on a pipe only (reading from stdin, and writing to stdout). It converts any double-byte Japanese (and maybe Chinese/Korean) EUC encoded characters and replaces them with HTML 4.0 Unicode entities.

Example usage:

cat some_euc_encoded_file.txt | euc2html > output.html

This application is basically a command line hack of a rather well done Win32 hack of an application by a master of language encodings, "William A. McKee" <risingsun@cjkware.com>, who took pity on me and authored the original application when I struggling to include Kanji on the Everything2 (http://www.everything2.com) website.

If you look at the source code, the hooks exist to do bi-directional processing (that is, convert HTML back to EUC). Also, JIS and S/JIS processing would be rather trivial to add. I do not need this functionality, so I did not implement it. If you do, send me that patches and I will roll it into a release.

Good luck.

Jordan.

---
jordanh@remotepoint.com


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.