Java UTF from toUTF_8(String s)

Here you can find the source of toUTF_8(String s)

Description

to UT_

License

Open Source License

Declaration

public static String toUTF_8(String s) throws Exception 

Method Source Code

//package com.java2s;
/**//from   w w w  .  ja  va  2 s.com
 * Copyright (C) 2002-2005 WUZEWEN. All rights reserved.
 * WUZEWEN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

public class Main {

    public static String toUTF_8(String s) throws Exception {
        if (s == null || s.length() < 1)
            return s;
        byte[] temp_b = s.getBytes("ISO-8859-1");
        String sTmpStr = new String(temp_b, "UTF-8");
        return sTmpStr;
    }
}

Related

  1. toUTF8k(String in)
  2. toUtf8Path(String path)
  3. toUTF8String(byte[] b, int offset, int length)
  4. toUtf8String(String source)
  5. toUTF8String(String str)
  6. toUTFBody(String str)
  7. toUtfBytes(final String s)
  8. toUtfString(char[] encoded)