[jira] [Created] (VELOCITY-883) Unwanted character appear when encoding special character

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (VELOCITY-883) Unwanted character appear when encoding special character

JIRA jira@apache.org
julien richard created VELOCITY-883:
---------------------------------------

             Summary: Unwanted character appear when encoding special character
                 Key: VELOCITY-883
                 URL: https://issues.apache.org/jira/browse/VELOCITY-883
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.7
         Environment: Spring 4, Velocity 1.7
            Reporter: julien richard


I want generate text containing temperature so I try the following command:

#if ($unit.matches(".*Celsius"))\
    °\
#end#**# $unit \

but I get the following output: *°*

the charater  is always displayed Regardless of the method used.


Velocity config:


{code:java}
  <bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
        <property name="resourceLoaderPath" value="/WEB-INF/velocity/"/>
        <property name="velocityProperties">
            <value>
                resource.loader=class
             class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
                RuntimeConstants.UBERSPECT_CLASSNAME=LinkingUberspector.class.getCanonicalName()
                LinkingUberspector.UBERSPECT_ARRAY_CLASSNAMES,UberspectImpl.class.getCanonicalName()
                input.encoding, UTF-8
                output.encoding, UTF-8
            </value>
        </property>
    </bean>
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]