Ignore:
Timestamp:
2014-04-23T02:30:39+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #9906 - fix reliance on default encoding

Location:
trunk/src/org/openstreetmap/josm/io
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CacheFiles.java

    r6889 r6995  
    322322        try {
    323323            MessageDigest md = MessageDigest.getInstance("MD5");
    324             BigInteger number = new BigInteger(1, md.digest(ident.getBytes()));
     324            BigInteger number = new BigInteger(1, md.digest(ident.getBytes(Utils.UTF_8)));
    325325            return number.toString(16);
    326326        } catch(Exception e) {
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r6889 r6995  
    176176        BufferedReader rd = null;
    177177        try {
    178             rd = new BufferedReader(new InputStreamReader(source));
     178            rd = new BufferedReader(new InputStreamReader(source, Utils.UTF_8));
    179179
    180180            StringBuilder sb = new StringBuilder(1024);
     
    243243            if(chkstrings.length > 1)
    244244            {
    245                 byte[] chb = chkstrings[0].getBytes();
     245                byte[] chb = chkstrings[0].getBytes(Utils.UTF_8);
    246246                int chk=0;
    247247                for (int i = 1; i < chb.length; i++) {
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r6966 r6995  
    191191        @Override
    192192        protected byte[] updateData() throws OsmTransferException {
    193             return sendRequest("GET", "capabilities", null, monitor, false, fastFail).getBytes();
     193            return sendRequest("GET", "capabilities", null, monitor, false, fastFail).getBytes(Utils.UTF_8);
    194194        }
    195195    }
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r6882 r6995  
    174174                        InputStream i = fixEncoding(activeConnection.getErrorStream(), encoding);
    175175                        if (i != null) {
    176                             BufferedReader in = new BufferedReader(new InputStreamReader(i));
     176                            BufferedReader in = new BufferedReader(new InputStreamReader(i, Utils.UTF_8));
    177177                            String s;
    178178                            while((s = in.readLine()) != null) {
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java

    r6920 r6995  
    190190        StringBuilder exception = new StringBuilder();
    191191        InputStream in = conn.getInputStream();
    192         BufferedReader br = new BufferedReader(new InputStreamReader(in));
     192        BufferedReader br = new BufferedReader(new InputStreamReader(in, Utils.UTF_8));
    193193        try {
    194194            String line = null;
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r6990 r6995  
    143143        try {
    144144            OutputStream raw = new BufferedOutputStream(request.getOutputStream());
    145             out = new OutputStreamWriter(raw);
     145            out = new OutputStreamWriter(raw, Utils.UTF_8);
    146146            BufferedReader in = new BufferedReader(new InputStreamReader(request.getInputStream(), "ASCII"));
    147147
Note: See TracChangeset for help on using the changeset viewer.