Java UTF from toUtf8Path(String path)

Here you can find the source of toUtf8Path(String path)

Description

to Utf Path

License

Apache License

Declaration

public static String toUtf8Path(String path) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.UnsupportedEncodingException;

import java.nio.charset.Charset;

public class Main {
    public static String toUtf8Path(String path) {
        try {//from   w ww  . j a v  a2s. c  om
            path = new String(path.getBytes("ISO-8859-1"), Charset.forName("UTF-8"));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return path;
    }
}

Related

  1. toUtf8ByteArray(String source)
  2. toUtf8Code(char utf16)
  3. toUtf8Codes(String str)
  4. toUTF8FromLatin1(byte[] outputBuffer, String string)
  5. toUTF8k(String in)
  6. toUTF8String(byte[] b, int offset, int length)
  7. toUtf8String(String source)
  8. toUTF8String(String str)
  9. toUTF_8(String s)