Java tutorial
//package com.java2s; public class Main { public static String removeBom(String in) { if (in != null && in.startsWith("\ufeff")) { in = in.substring(1); } return in; } }