com.gisgraphy.helper
Class EncodingHelper

java.lang.Object
  extended by com.gisgraphy.helper.EncodingHelper

public class EncodingHelper
extends java.lang.Object

Encoding helper

Author:
David Masclet

Field Summary
protected static org.slf4j.Logger logger
           
 
Constructor Summary
EncodingHelper()
           
 
Method Summary
static java.lang.String removeAccents(java.lang.String input)
          To replace accented characters in a String by unaccented equivalents.
static void setJVMEncodingToUTF8()
          Set the file.encoding and sun.jnu.encoding to UTF-8
static java.lang.String toUTF8(java.lang.String string)
          useful for windows only, this method is a workaround for encoding problems on Windows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger
Constructor Detail

EncodingHelper

public EncodingHelper()
Method Detail

toUTF8

public static java.lang.String toUTF8(java.lang.String string)
useful for windows only, this method is a workaround for encoding problems on Windows.
any suggestion are welcomed

Returns:
the string in utf-8

setJVMEncodingToUTF8

public static void setJVMEncodingToUTF8()
Set the file.encoding and sun.jnu.encoding to UTF-8


removeAccents

public static final java.lang.String removeAccents(java.lang.String input)
To replace accented characters in a String by unaccented equivalents. source code from lucene ISOLatin1AccentFilter



Copyright © 2010. All Rights Reserved.