Java UTF from toUtf8(String texto)

Here you can find the source of toUtf8(String texto)

Description

to Utf

License

Apache License

Declaration

public static String toUtf8(String texto) 

Method Source Code

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

public class Main {

    public static String toUtf8(String texto) {
        try {//from  w w  w .  ja  va  2  s. c  o  m
            return new String(texto.getBytes(), "UTF-8");
        } catch (Exception e) {
            return "";
        }
    }
}

Related

  1. toUtf8(String s)
  2. toUTF8(String s)
  3. toUTF8(String s, String encoding)
  4. toUTF8(String str)
  5. toUTF8(String string)
  6. toUTF8ByteArray(String s)
  7. toUtf8ByteArray(String source)
  8. toUtf8Code(char utf16)
  9. toUtf8Codes(String str)