Thread: html encoding issue

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    27

    html encoding issue

    I only know from http header meta field, it could be assigned html encoding. I am not sure whether there are any other ways to assign html encoding? Like HTTP response header? Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    The relevant RFC would tell you.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    27
    Which RFC?

    Quote Originally Posted by Salem View Post
    The relevant RFC would tell you.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Hmm, I don't know maybe the one about HTTP? And/or HTML?

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    27
    In RFC2616, there are content-encoding, transfer-encoding and accept-encoding. I am not sure which one applies to the encoding of response html. Any ideas?

    Quote Originally Posted by zacs7 View Post
    Hmm, I don't know maybe the one about HTTP? And/or HTML?

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Content-encoding would be your best bet.

  7. #7
    Registered User
    Join Date
    Dec 2008
    Posts
    32
    Content-Encoding and Accept-Encoding are essentially just used for compression during the transfer. I don't know what you mean by "HTML encoding" but I don't see how gzip and deflate could possibly be construed as "HTML encoding". Even if one's first language is not english.

    Are you looking for something as simple as Content-Type?

    What exactly are you trying to do, and what do you mean by "HTML encoding"?

    -core

  8. #8
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I assumed they were talking about byte encoding of the HTML (text that is), ie UTF-8 etc.

  9. #9
    Registered User
    Join Date
    Dec 2008
    Posts
    32
    Ohhh the character set. If that's what he means, then that is simple:

    Content-Type: text/html; charset=utf-8

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. float calculation issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-26-2008, 04:56 AM
  2. XML encoding issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-16-2008, 05:21 AM
  3. Please Help - C code creates dynamic HTML
    By Christie2008 in forum C Programming
    Replies: 19
    Last Post: 04-02-2008, 07:36 PM
  4. Design + HTML
    By orbitz in forum C Programming
    Replies: 8
    Last Post: 11-21-2002, 06:32 AM