Loading ...
Sorry, an error occurred while loading the content.

Re: YUI Connection Manager - Setting response encoding

Expand Messages
  • lou_tribal
    I do not know exactly how you return your HTML chunk but there are many places where to specify the encoding: 1. is the HTML tag and is here to
    Message 1 of 2 , Nov 30, 2007
    • 0 Attachment
      I do not know exactly how you return your HTML chunk but there are
      many places where to specify the encoding:

      1. <meta...> is the HTML tag and is here to specify the browser that
      the page is in this encoding.

      2. <%@ page contentType="text/html; charset=ISO-8859-1" %> is the JSP
      tag specifying the JSP encoding.

      3. response.setCharacterEncoding("myEncoding") is there to specify the
      encoding of the http response if you directly write to it.

      I would encourage you to work in UTF-8 from end to end and you won't
      have to deal with that kind of problem and will be able to support any
      other kind of language if needed one day.

      <

      --- In ydn-javascript@yahoogroups.com, "sveinaregronsund"
      <sveinare@...> wrote:
      >
      > I am using YUI Connection Manager to populate a part of the page
      > (replacing innerHTML). But the chunk of data I send as response is a
      > JSP-page (meaning a html-snippet).
      >
      > I use Norwegian characters here and I need/want to specify "text/
      > html; charset=ISO-8859-1" as Content-Type. But how do I specify that?
      >
      > I use Struts as the serverside framework, and when I return full
      > pages, I include <meta http-equiv="Content-Type" content="text/html;
      > charset=ISO-8859-1"/> in the header, but how do I do this when only
      > returning a chunk of html?
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.