Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { protected static final String encodingUTF8andChange(byte[] src, int srart, int length) throws Exception { byte[] b = new String(src, srart, length, "euc-kr").getBytes("utf-8"); String str = new String(b).trim(); return new BigDecimal(str).setScale(2, BigDecimal.ROUND_HALF_UP).toString(); } }