Camel
  1. Camel
  2. CAMEL-1278

VelocityEndpoint reads velocity templates using default encoding - add parameter to set encoding

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.6.0, 2.0-M1
    • Component/s: camel-velocity
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      VelocityEndpoints reads templates using default encoding, so I cannot get correct content while running on Windows and Linux.

      The reason is that there is used InputStreamReader constructor without encoding parameter.

      I've added simple support for setting encoding - see attached patch

        Activity

        Hide
        Damian Golda added a comment -

        Patch to VelocityEndpoint.java

        Show
        Damian Golda added a comment - Patch to VelocityEndpoint.java
        Hide
        Jonathan Anstey added a comment -

        I've committed your changes in revision 736046. Thanks for the contribution Damian! I also added a little unit test for this new option.

        Show
        Jonathan Anstey added a comment - I've committed your changes in revision 736046. Thanks for the contribution Damian! I also added a little unit test for this new option.
        Hide
        Jonathan Anstey added a comment -
        Show
        Jonathan Anstey added a comment - Updated the wiki here as well http://cwiki.apache.org/confluence/display/CAMEL/Velocity
        Hide
        Claus Ibsen added a comment -

        Remember to update the wiki

        Show
        Claus Ibsen added a comment - Remember to update the wiki
        Hide
        Jonathan Anstey added a comment -

        Haha! Beat you to it, wiki police

        Show
        Jonathan Anstey added a comment - Haha! Beat you to it, wiki police
        Hide
        Damian Golda added a comment -

        Jonathan, thank you for very quick action. I'm impressed.

        Show
        Damian Golda added a comment - Jonathan, thank you for very quick action. I'm impressed.
        Hide
        Claus Ibsen added a comment -

        Closing 2.0m1 tickets

        Show
        Claus Ibsen added a comment - Closing 2.0m1 tickets

          People

          • Assignee:
            Jonathan Anstey
            Reporter:
            Damian Golda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development