Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5 beta2
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None

      Description

      The test:

      ===
      public void testU() throws Exception

      { VelocityEngine ve = new VelocityEngine(); ve.init(); Context context = new VelocityContext(); StringWriter writer; writer = new StringWriter(); ve.evaluate(context, writer, "test","#set($v = \"\\u0061\")$v"); //assertEquals("a", writer.toString()); }

      ===

      I think "\u0061" shoud produce "a", see VELOCITY-519. But if not, this should produce string "\u0061", literally, but not exception, as now.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          38d 22h 6m 1 Nathan Bubna 03/Apr/07 22:51
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551651 ] jira [ 12552529 ]
          Mark Thomas made changes -
          Workflow jira [ 12398176 ] Default workflow, editable Closed status [ 12551651 ]
          Jarkko Viinamäki made changes -
          Link This issue relates to VELOCITY-709 [ VELOCITY-709 ]
          Nathan Bubna made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Nathan Bubna added a comment -

          Ok, the fix and an improved/combined version of your test case are committed. All tests pass.

          Show
          Nathan Bubna added a comment - Ok, the fix and an improved/combined version of your test case are committed. All tests pass.
          Henning Schmiedehausen made changes -
          Component/s Engine [ 12311337 ]
          Will Glass-Husain made changes -
          Fix Version/s 1.6 [ 12310290 ]
          Hide
          Nathan Bubna added a comment -

          Argh, that's not right. And since this apparently hasn't been working, it looks like adding unicode is at least backwards compatible. In that case, i guess i'm fine with this going either way. Either literally producing "\u0061" or producing "a". If people want unicode in VTL string definitions, i won't protest.

          I'm still opposed to having \n \r \" or other such escaping. Especially since we can now put line breaks directly in the strings:

          #set( $foo = " this has a line
          break in it" )

          And we should hopefully soon be able to do "" or '' escaping for quotes (assuming Geir finds the changes he once made to enable that or else one of us duplicates the effort).

          Show
          Nathan Bubna added a comment - Argh, that's not right. And since this apparently hasn't been working, it looks like adding unicode is at least backwards compatible. In that case, i guess i'm fine with this going either way. Either literally producing "\u0061" or producing "a". If people want unicode in VTL string definitions, i won't protest. I'm still opposed to having \n \r \" or other such escaping. Especially since we can now put line breaks directly in the strings: #set( $foo = " this has a line break in it" ) And we should hopefully soon be able to do "" or '' escaping for quotes (assuming Geir finds the changes he once made to enable that or else one of us duplicates the effort).
          Stepan Koltsov made changes -
          Field Original Value New Value
          Link This issue relates to VELOCITY-519 [ VELOCITY-519 ]
          Stepan Koltsov created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Stepan Koltsov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development