You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Holger Klawitter <in...@klawitter.de> on 2023/03/21 09:17:18 UTC

tag files compiled in wrong encoding?

Hi there,

I am investigating an encoding problem in the compiler for tag files:

the following tag file (WEB-INF/tag/umlaut.tag):

<%@tag
  trimDirectiveWhitespaces="true"
  pageEncoding="UTF-8"
%>
<%= "ü does not work" %> // bytes c3 bc

(the file is in utf-8)

compiles into umlaut_tag.java in which the umlaut is doubly utf-8 encoded
like this:

      out.print( "ü does not work" ); // bytes c3 83 c2 bc

String literals in jsp files work just fine, so I assume that the basic
encoding setup is correct.

Is this a jasper problem? Where can I report this (which component in bz)?
Or am I missing some peculiarities regarding tags files?

Regards,
  Holger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tag files compiled in wrong encoding?

Posted by Holger Klawitter <in...@klawitter.de>.
Hi Mark,

this fix was light speed! Thanks a lot!

Regards,
  Holger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tag files compiled in wrong encoding?

Posted by Mark Thomas <ma...@apache.org>.
On 21/03/2023 09:17, Holger Klawitter wrote:
> Hi there,
> 
> I am investigating an encoding problem in the compiler for tag files:
> 
> the following tag file (WEB-INF/tag/umlaut.tag):
> 
> <%@tag
>    trimDirectiveWhitespaces="true"
>    pageEncoding="UTF-8"
> %>
> <%= "ü does not work" %> // bytes c3 bc
> 
> (the file is in utf-8)
> 
> compiles into umlaut_tag.java in which the umlaut is doubly utf-8 encoded
> like this:
> 
>        out.print( "ü does not work" ); // bytes c3 83 c2 bc
> 
> String literals in jsp files work just fine, so I assume that the basic
> encoding setup is correct.
> 
> Is this a jasper problem?

Looks like it at this point.

> Where can I report this (which component in bz)?

Jasper.

> Or am I missing some peculiarities regarding tags files?

Nothing comes to mind although it is a while since I delved into the 
details of tag files. If you create the bug with the simplest example 
that creates the problem someone will take a look.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org