Export french characters
// description of your code here
java -Dfile.encoding=CP850 YourClassName export JAVA_OPTS=-Dfile.encoding=UTF-8
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
java -Dfile.encoding=CP850 YourClassName export JAVA_OPTS=-Dfile.encoding=UTF-8
System.setProperty("file.encoding","UTF-8")
System.setProperty("file.encoding","CP850")
def delimiters = [:]
//String data = new String((byte[])"é():;éééçç,.<>[]","UTF-8");
def data = "é():;éùùçç,.<>[]"
data = data.replace('é', 'e');
println data
println data.size()
data.each { c ->
// def str = Long.toHexString(c as long)
def str = c
// if (!(c =~ /\w/)) {
if (c == 'é') {
delimiters[c] = "Annul\u00E7e"
}
else if(c == 'ù') {
delimiters[c] = "\u00E7"
}
else
{
delimiters[c] = str
}
}
println delimiters
def dynamic = 1 dynamic = "I am a String stored in a variable of dynamic type" int typed = 2 typed = "I am a String stored in a variable of type int??" // throws ClassCastException