Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6227

CharSequenceResource calculates wrong length when there are unicode symbols

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.4.0
    • 8.0.0-M2, 6.25.0, 7.5.0
    • wicket
    • None

    Description

      At the moment CharSequenceResource#getLength() looks like:

      @Override
      	protected Long getLength(CharSequence data)
      	{
      		return (long) data.length();
      	}
      

      This returns wrong results when there are unicode symbols like "\u1234".

      It should use org.apache.wicket.util.string.Strings#lengthInBytes() instead.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: