[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    [jira] [Created] (VELOCITY-883) Unwanted character appear when encoding special character
From:       "julien richard (JIRA)" <jira () apache ! org>
Date:       2017-08-09 15:08:00
Message-ID: JIRA.13093507.1502291249000.128697.1502291280559 () Atlassian ! JIRA
[Download RAW message or body]

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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic