6 replies [Last post]
Terabyte
Terabyte's picture
Offline
newbie
Cleveland, OH (USA)
Last seen: 15 years 4 weeks ago
Cleveland, OH (USA)
Timezone: GMT-4
Joined: 2007-04-22
Posts: 8
Points: 0

I'm running Windows XP Pro and was using NotePad to edit all CSS and HTML files. I recently found a source code editor called 'NotePad++' that has a zillion options, and then some.

When I was running through the many options NotePad++ has, I quickly noticed that the Character Encoding from Windows XP Notepad was ANSI. NotePad++ alows me to save the encoding to UTF-8, ANSI, UCS-2 Small Indian or UCS-2Large Indian (in addition to converting to Unix and Mac).

My DTD is XHTML 1.0 Strict//EN, content=application/xhtml+xml, and HTML charset=UTF-8.

Should I be saving the HTML as ANSI or UTF-8? What is recommended?

By the way, I found this NotePad++ at http://notepad-plus.sourceforge.net/uk/site.htm

Thanks in advance,

Just a beginner ... Tom. C.

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 26 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Save files as plain ansi,

Save files as plain ansi, configure your server and page meta character sets in the character set of your choice iso-8859 or utf-8; utf-8 if your working with true xhtml.

Are you really serving up pages as application/xhtml+xml ?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Terabyte
Terabyte's picture
Offline
newbie
Cleveland, OH (USA)
Last seen: 15 years 4 weeks ago
Cleveland, OH (USA)
Timezone: GMT-4
Joined: 2007-04-22
Posts: 8
Points: 0

ANSI it will be.

Yea, when I validate the pages I've finished, it passes but with a message from W3C Validation:

"The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported."

So I'll just change the encoding back to ANSI, rather than UTF-8.

As for serving up pages as application/xhtml+xml, sure. Why? Is this wrong? I received a couple 'warning' messages when I validated with the Total Validator Tool, recommending that I use this content type. I also went to W3C and it said the same (unless I'm mistaken). This is where I read it at: http://www.w3.org/TR/xhtml-media-types/ and it is under the 3.5 Summary, near the middle of the page.

If this is wrong, please let me know so I can fix it. the web site I'm building is here: http://www2.webng.com/cityPCservice/

Not all the pages are finished, and hope to have them completed in just a few days.

Thanks..

Tom.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 26 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

You are not serving your

You are not serving your pages as 'application/xhtml+xml'

In fact I'd have to laugh if one could serve xhtml correctly from a IIS server, would be a little ironic Smile

Content-Length: 5854
Content-Type: text/html
Content-Location: http://www2.webng.com/cityPCservice/index.html
Last-Modified: Sun, 29 Apr 2007 17:27:35 GMT
Accept-Ranges: bytes
Etag: "55bc1ad838ac71:2a8"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sun, 29 Apr 2007 17:37:01 GMT

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 18 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

In case you don't know why

In case you don't know why Hugo would laugh, IE would have a myocardial infarction if served application/xhtml+xml.

Terabyte
Terabyte's picture
Offline
newbie
Cleveland, OH (USA)
Last seen: 15 years 4 weeks ago
Cleveland, OH (USA)
Timezone: GMT-4
Joined: 2007-04-22
Posts: 8
Points: 0

application/xhtml+xml

The HTML in my page is: content="application/xhtml+xml; charset=utf-8" but when viewed from this server it publishes as text/html content. After finishing with the site, I will be loading it up to a Unix/Linux server (Yahoo).

Are there things I should be concerned about with this?

Does the WebNG (Microcrap Windows-based) server automatically convert the content?

Thanks guys.

Just a beginner .. Tom C.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 26 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

the HTML in your page is

the HTML in your page is content....

Yes but that is just a meta tag and relatively unimportant and subservient to the primary server setting which is what gets sent in response to the browser get command.

likely your Linux server? (what servers that then?) will default to text/html I think most web servers will do.

Regardless of all this you don't really want to serve your pages as application/xhtml+xml especially unless you care not for IE being able to render the page , which I would commend as an most sensible attitude personally but many would not agree with me Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me