Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running Debian Etch. I've installed apache2 and have setup a website on the localhost ip address. I'll never really go online. I had apache setup the same way on my windows partition before I had linux, and since then I have been moving files from the old site to the new site.
There is one page that displays wrong. Apache2 shows it as normal letters with lots of spaces in between them, though you cannot read them. When firefox is told to show the page wihtout the server ("open file...") the page comes up fine. When I look at the page with vim the contents are correct, but gedit and kate cannot display the page right. Gedit complains the page is in the wrong character encoding (not UTF-8?), and kate says the page is a binary. Kate ultimately shows the file with a space after every letter. If I "cat" the file I can see it, but "less" says the file may be binary and shows junk on the screen. How do I get my document back?
to see what kind of file it is... it may shed some light on this problem. Otherwise, can't you just open it in vim, copy all the contents and then paste them into a new file?
I can still look at general_utf8.html, but apache2 still won't show it. The "file" command has improved. Before it said nothing after the word "general.html".
Quote:
file general_utf8.html
general_utf8.html: data
Do I have the right encodings? Where do I see what they are? "iconv -l" just gives a list.
EDIT: after the "iconv" command, I can still see the file with "cat" but no longer with "vim". The file opens up, but every other character is unreadable... mostly blue carrot (^) and blue ampersand (@)...
Blue ampersand? humm then the conversion failed or your machine is not in utf8 (result of locale is the minimum)
You have to know which encoding is for this original file (I have no clue how to know this, the only way I do it is with od -x filename )
If you are in a hurry, use the mouse as someone said
In the end I used "cat" to display the file (a version of the file I had saved from before I used "iconv") and I copied and pasted the contents into another text editor. The file was too long for the xterm memory, (even when I had scrolled all the way to the top there was still stuff missing from the beginning of the file) so I had to do part of it in pieces from "vim". Thanks pwc101. Thanks everyone for the advice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.