Java UTF to String getISOString(String src)

Here you can find the source of getISOString(String src)

Description

get ISO String

License

Open Source License

Declaration

public static String getISOString(String src) 

Method Source Code


//package com.java2s;
import java.io.UnsupportedEncodingException;

public class Main {

    public static String getISOString(String src) {
        try {/*from  w w  w  .j av a  2s.c om*/
            return new String(src.getBytes("UTF-8"), "ISO8859-1");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            return src;
        }
    }
}