Sublime Forum

Opening HTML files using sublime text 2-Windows 7 64-bit

#1

I’m taking a very beginning HTML course and my instructor wanted us to use SublimeText so I went to the website and downloaded sublime text 2 but now that I have it installed I can’t seem to open the courseSample files and have them display correctly. The exercise files are HTML and are supposed to be things like restaurant menus from a fictional restaurant used for the exercises. But all I’m getting our rows and rows of numbers clustered in groups of four across the screen. I don’t know what I’m looking at or how to get the files to display properly. Can someone help, please?

As a temporary alternative, I’ve been using WordPad as my text editor and Internet Explorer as my browser and the files display just fine as readable words and headings etc. but I still want to know how to use Sublime Text 2 because it looks like A cool editor that can do lots and lots of very nice things. I’m finding it frustrating because I keep having to switch back and forth between WordPad and Internet Explorer. I’m using Windows 7 on a PC 64 bit laptop. I hope someone can help… It’s been several days already and I’m getting behind in the exercises. My teacher is of no help in this regard. Please answer back as soon as you can. Thank you very much for your time and attention. :smile:

0 Likes

#2

Sounds very much like you’re trying to open an RTF file in Sublime, which indeed would display as hex characters in groups of four.

You need to be dealing with HTML files as plain text. The extension on the file would normally be .html (or maybe .htm).

Whether your file is currently named .html or .rtf, open it in Wordpad, and then save it as plain text (“Text Document”). Make sure the new file has an .html extension. Then open it in Sublime. (BTW, you normally wouldn’t use Wordpad to edit HTML or any kind of code or script. It’s a like a lite word processor, producing “rich” text documents, and isn’t really suited for dealing with plain text. If you don’t have Sublime handy, you can use Notepad in a pinch – it’s a simple plain text editor.)

Good luck!

0 Likes

#3

i have the same issue with .html files that open up as a list of numbers… like this
3c21 444f 4354 5950 4520 6874 6d6c 2050
5542 4c49 4320 222d 2f2f 5733 432f 2f44

they are .html files and open up fine in ie. notepad++

any idea?

0 Likes

#4

You most likely have unprintable bytes in the file, e.g. 0x00 or 0x19 (basically anything <0x20 that is not 0x09, 0x0A or 0x0D). Sublime Text thinks that you have a binary file.

You can disable the 0x00 detection afaik but I’m not sure about the others.

0 Likes