David Sean Taylor <david <at> bluesunrise.com> writes:

> 
> Veronica Padrón wrote:
> > I´ve a problem with jetspeed 2.0, because I cannot change the encoding to 
ISO-
> > 8859-1
> > 
> > I had changed the jetspeed.properties, and include the line:
> > content.defaultencoding=ISO-8859-1
> > 
> This is no longer used
> 
> > I had changed the velocity.properties, and include the lines:
> > template.encoding=iso-8859-1
> > input.encoding =iso-8859-1
> > 
> > and nothing......
> > 
> > the encoding of my pages is UTF-8
> > 
> > Please, something can I help me????
> > 
> Take a look at the CapabilitiesValveImpl:
> 
>         String agent = request.getRequest().getHeader("User-Agent");
> 
>          // Get capability map
>          CapabilityMap cm = capabilities.getCapabilityMap(agent);
>          MediaType mediaType = cm.getPreferredMediaType();
>          MimeType mimeType = cm.getPreferredType();
> 
>          String encoding = request.getRequest().getCharacterEncoding();
> 
> ....
> 
>          String encoding = request.getRequest().getCharacterEncoding();
> 
>          if (encoding == null)
>          {
>              if (mediaType != null && mediaType.getCharacterSet() != null)
>              {
>                  encoding = mediaType.getCharacterSet();
>              }
>          }
> 
> Most likely, you are getting your encoding from the Jetspeed 
> Capabilities settings, coming from MEDIA_TYPE table data
> 
I tried it, but I don´t manage it to resolve.
I cannot implements the solution of David Sean Taylor, so I decided to try 
severals things:
1.- I have make a ServletFilter to change the encoding, I declared it in the 
web.xml of my portlet aplication, but nothing.
2.- I changed the ../webapps/jetspeed/WEB-INF/jetspeed-macros.vm and I modified 
the macro ContentType to put then charset to ISO-8859-1. With this solution in 
my browser (Mozilla) I can see the information of my page and the meta-tag 
content is correct, but the codification is UTF-8.
In this moment if I save my page with mozilla (p.e. in my desktop) and then 
open it (with mozilla) the codification is correct (ISO-8859-1). (I supose that 
the server send in the header the incorrect charset).

Not that to do

Please something can I help me......

Thank you very much.

   





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to