Here you can find the source of convertISO8859_1_to_UTF_8(String s)
public static String convertISO8859_1_to_UTF_8(String s)
//package com.java2s; /******************************************************************************* * Cloud Foundry/*from w w w . jav a 2 s . com*/ * Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved. * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. * * This product includes a number of subcomponents with * separate copyright notices and license terms. Your use of these * subcomponents is subject to the terms and conditions of the * subcomponent's license, as noted in the LICENSE file. *******************************************************************************/ import java.nio.charset.Charset; public class Main { public static final String ISO_8859_1 = "ISO-8859-1"; public static final String UTF_8 = "UTF-8"; public static String convertISO8859_1_to_UTF_8(String s) { if (s == null) { return null; } else { return new String(s.getBytes(Charset.forName(ISO_8859_1)), Charset.forName(UTF_8)); } } }