Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - charset on css

 
Thread Tools Search this Thread
Old 03-19-2005, 05:06 AM   #1
Default charset on css


I see "@charset "iso-8859-1";" at the top of some external css style sheets.
Is this important? It seems not to be essential? Please.

dorayme



dorayme
  Reply With Quote
Old 03-19-2005, 04:10 PM   #2
Edwin van der Vaart
 
Posts: n/a
Default Re: charset on css
dorayme wrote:
> I see "@charset "iso-8859-1";" at the top of some external css style sheets.

Could you give us some links ot those external style sheet files with a
charset?

> Is this important? It seems not to be essential? Please.

It isn't essential and non-important.
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


Edwin van der Vaart
  Reply With Quote
Old 03-20-2005, 11:50 AM   #3
dorayme
 
Posts: n/a
Default Re: charset on css
> From: Edwin van der Vaart <>
> Organization: Cyberspace can be like a black hole. Stuff gets sucked in, never
> seen again.
> Newsgroups: alt.html
> Date: Sat, 19 Mar 2005 16:10:06 GMT
> Subject: Re: charset on css
>
> dorayme wrote:
>> I see "@charset "iso-8859-1";" at the top of some external css style sheets.

> Could you give us some links ot those external style sheet files with a
> charset?
>
>> Is this important? It seems not to be essential? Please.

> It isn't essential and non-important.
> --
> Edwin van der Vaart


Yes, I saw it on a css that commanded my respect at least!
http://webhost.bridgew.edu/etribou/l...o/css/base.css for
http://webhost.bridgew.edu/etribou/l...doo/index.html

Just wondering why he put it there. It is at the top of all or most of the
css sheets he uses.


dorayme




dorayme
  Reply With Quote
Old 03-20-2005, 01:14 PM   #4
Toby Inkster
 
Posts: n/a
Default Re: charset on css
dorayme wrote:

> Just wondering why he put it there.


Perhaps he doesn't have access to specify the charset in the HTTP header
(where it belongs).

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Now Playing ~ ./beatles/blue_cd1/01_strawberry_fields_forever.ogg



Toby Inkster
  Reply With Quote
Old 03-20-2005, 03:35 PM   #5
Edwin van der Vaart
 
Posts: n/a
Default Re: charset on css
Toby Inkster wrote:
> dorayme wrote:
>
>>Just wondering why he put it there.

>
> Perhaps he doesn't have access to specify the charset in the HTTP header
> (where it belongs).

Suppose he doesn't have access to specify the charset in the http
header. Then he have to specify the charset on every html page.

My question is where can I find the http header file if I want to
specify the charset?
If I google for it, Google find header files for c, c+, c++, gcc, etc.
but not http header files.
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


Edwin van der Vaart
  Reply With Quote
Old 03-20-2005, 04:11 PM   #6
Toby Inkster
 
Posts: n/a
Default Re: charset on css
Edwin van der Vaart wrote:

> My question is where can I find the http header file if I want to
> specify the charset?


There is no "header file". The HTTP headers are some lines sent by the
server to the client (and vice versa, but those are not relevant in this
context) before they send the requested file.

They include various status information and meta-data about the file
that's about to be sent.

If your page is being dynamically generated using a scripting language,
then you can generally influence the HTTP headers from within the script.

For example, in Perl you can do this:

#!/usr/bin/perl
print "Content-Type: text/html; charset=utf-8\n";
print "X-Custom-Header-1: foobar\n\n";

Or in PHP:

<?php
header('Content-Type: text/html; charset=utf-8');
header('X-Custom-Header-1: foobar')
?>

Or in ASP:

<%
Response.ContentType = "text/html"
Response.Charset = "utf-8"
Response.AddHeader "X-Custom-Header-1", "foobar"
%>

If you are using static files, then setting HTTP headers will require
manipulating the server's settings.

For example, in Apache you can use ".htaccess" config files to set headers:

Header set Content-Type text/html;charset=utf-8
Header set X-Custom-Header-1 foobar

Or instead:

Header set X-Custom-Header-1 foobar
AddType text/html .html
AddCharset utf-8 .utf8

and then a file with the name "myfile.html.utf8" will be served with the
same headers as my earlier examples.

Other servers will use other methods.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact



Toby Inkster
  Reply With Quote
Old 03-20-2005, 07:32 PM   #7
Edwin van der Vaart
 
Posts: n/a
Default Re: charset on css
Toby Inkster wrote:
> Edwin van der Vaart wrote:
>
>>My question is where can I find the http header file if I want to
>>specify the charset?

>
> There is no "header file". The HTTP headers are some lines sent by the
> server to the client (and vice versa, but those are not relevant in this
> context) before they send the requested file.
>
> They include various status information and meta-data about the file
> that's about to be sent.
>
> If your page is being dynamically generated using a scripting language,
> then you can generally influence the HTTP headers from within the script.
>
> For example, in Perl you can do this:
>
> #!/usr/bin/perl
> print "Content-Type: text/html; charset=utf-8\n";
> print "X-Custom-Header-1: foobar\n\n";
>
> Or in PHP:
>
> <?php
> header('Content-Type: text/html; charset=utf-8');
> header('X-Custom-Header-1: foobar')
> ?>
>
> Or in ASP:
>
> <%
> Response.ContentType = "text/html"
> Response.Charset = "utf-8"
> Response.AddHeader "X-Custom-Header-1", "foobar"
> %>
>
> If you are using static files, then setting HTTP headers will require
> manipulating the server's settings.
>
> For example, in Apache you can use ".htaccess" config files to set headers:
>
> Header set Content-Type text/html;charset=utf-8
> Header set X-Custom-Header-1 foobar
>
> Or instead:
>
> Header set X-Custom-Header-1 foobar
> AddType text/html .html
> AddCharset utf-8 .utf8
>
> and then a file with the name "myfile.html.utf8" will be served with the
> same headers as my earlier examples.
>
> Other servers will use other methods.

Thanx for the info.
I'll play with those examples.
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


Edwin van der Vaart
  Reply With Quote
Old 03-20-2005, 10:34 PM   #8
dorayme
 
Posts: n/a
Default Re: charset on css
> From: Toby Inkster <>
> Newsgroups: alt.html
> Date: Sun, 20 Mar 2005 13:14:46 +0000
> Subject: Re: charset on css
>
> dorayme wrote:
>
>> Just wondering why he put it there.

>
> Perhaps he doesn't have access to specify the charset in the HTTP header
> (where it belongs).
>
> --
> Toby A Inkster BSc (Hons) ARCS



I feared there would be a reason I did not understand properly! Not your
fault of course, just me not on top of this stuff. If you have time to
explain simply, I would greatly appreciate it. Please do not feel obliged.
In the meantime, I am gathering this charset reference is not needed
normally at the head of external css sheets.

dorayme



dorayme
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46