Home Download Buy Blog Forum Support

ST 2 strange encoding with html

ST 2 strange encoding with html

Postby philosopherdog on Sun Mar 11, 2012 7:59 pm

2012-03-11_155017.png
This is how ST renders the page when viewed in FF
2012-03-11_155017.png (8.34 KiB) Viewed 513 times
Hi,
I did a viewsource on a webpage and copied it into ST2 and then saved it out and viewed it. It's doing something wrong with the encoding on certain characters. I do the same thing with Notepad++ and it handles it perfectly. Here's a couple of screen shots showing the weird way it renders some smart quotes. What is the solution?
philosopherdog
 
Posts: 35
Joined: Sat Nov 26, 2011 3:08 pm

Re: ST 2 strange encoding with html

Postby philosopherdog on Sun Mar 11, 2012 8:00 pm

notepad_plusplus.png
Same File after saving it using Notepad++
notepad_plusplus.png (8.99 KiB) Viewed 535 times
Here's the same text after it is copied into Notepad++. Something weird is happening with the encoding. Anyone know what the issue is?
philosopherdog
 
Posts: 35
Joined: Sat Nov 26, 2011 3:08 pm

Re: ST 2 strange encoding with html

Postby jps on Sun Mar 11, 2012 10:37 pm

Sublime Text will save it as UTF-8 by default. You'll need to add a meta tag indicating that the encoding of the file is UTF-8.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: ST 2 strange encoding with html

Postby philosopherdog on Sun Mar 11, 2012 11:26 pm

Hi,
Thanx. So I need to explicitly give this tag. Will do.
philosopherdog
 
Posts: 35
Joined: Sat Nov 26, 2011 3:08 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 26 guests