Changeset 6908 in josm for trunk/src/org


Ignore:
Timestamp:
2014-03-12T15:20:34+01:00 (11 years ago)
Author:
Don-vip
Message:

see #9784 - UTF8 encoding of strings used in CRC2 computation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r6899 r6908  
    571571
    572572        /**
    573          * Calculate the CRC32 checksum from a string
     573         * Calculates the CRC32 checksum from a string (based on RFC 1952).
    574574         * @param s the string
    575575         * @return long value from 0 to 2^32-1
     
    577577        public static long CRC32_checksum(String s) {
    578578            CRC32 cs = new CRC32();
    579             cs.update(s.getBytes());
     579            cs.update(s.getBytes(Utils.UTF_8));
    580580            return cs.getValue();
    581581        }
Note: See TracChangeset for help on using the changeset viewer.