Announcement

Collapse
No announcement yet.

[SOLVED:] is there system utility for char. code conversion of files?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED:] is there system utility for char. code conversion of files?

    As I come increasingly to appreciate the power of Kubuntu Linux, I learning to expect more - to look for features I hadn't thought of until now. Here's one:

    I often output the "info {command}" command to a text file so I can read the whole file easily in a text editor, now and later. This has been a nice convenience, EXCEPT that the character coding used for this text is not that used by my text editor jEdit.

    I have the editor set to "windows-1250", since I've recently migrated from WinXP, and many of my files are coded that way.

    I only run into this problem with the "info..." or "man...." command output. If I could run some handy system utility convert them to windows1250 I'd love to do it. I'm hope I can find a way to get jEdit to do this for me, but haven't so far.

    So...is there a system utility of the sort I'm looking for? I googled for this and didn't come up with any thing.

    #2
    Re: is there system utility for char. code conversion of files?

    If you are happy to use a command line, there are, in order of increasing power, tr, sed and awk, to do the type of thing you are describing.

    For instance

    man tr

    will get you the manual page for tr.

    There is a learning curve involved with these traditional Unix tools, but because of what they can do, it is probably well worth while. I would recommend the book "A Practical Guide to Linux Commands, Editors and Shell Programming" by Mark G. Sobell, ISBN 0-13-147823-0 as the best of many books on the subject that I have read.

    If that can't do what you want, you need a C program (or Perl, or Python...). Again, worth the effort, if you want to do things like you describe quite often.

    Comment


      #3
      Re: is there system utility for char. code conversion of files?

      THANKS! Very good and useful answer. I am very fast getting comfortable with working in a console. Spent the day doing it, in fact. Thanks for the book recommendation - as I'm also looking for a reference work. Finally - it hadn't yet occured to me that I could solve my own problem - in ruby, which I'm well into learning. Cool.

      Comment


        #4
        Re: [SOLVED:] is there system utility for char. code conversion of files?

        for your specific problem there is a simpler solution:

        in konqueror, type in the address bar
        Code:
         man:command
        to display man pages, or

        Code:
         info:command
        to display info pages.

        Comment

        Working...
        X