ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

HTTP header content type

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP header content type

    I have an interesting problem regarding character sets and CGIDEV2. We have a number of German characters appearing in a CGIDEV2 web page and most of the time they appear correctly. However, occasionally they will all be rendered as a question mark in a black diamond '�'.

    I have unearthed the following article that explains why this happens...


    So it looks like the client is mistaking the character set?

    It is possible using the firebug plugin in firefox to inspect the HTTP header and see what encoding the server is instructing the client to use. We are not using any META tags in the HEAD. We just use the apache default encoding of ISO-8859-1. For a normal server request/response everything works fine. However, with an AJAX request/response the content-type gets output multiple times.

    PHP Code:
    Content-Type    text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-1;text/htmlcharset=ISO-8859-
    Sometimes this gets cut off so that the last thing it says is something like 'charset=ISO-8'. When this happens the characters don't always render properly.

    Has anyone come across anything similar?
    Ben
Working...
X