[rules-users] Danish letters error in guvnor decision table

Manasi manasi.a.damle at capgemini.com
Mon Feb 4 01:11:38 EST 2013


Hi,

Currently I am using following code to insrt data directly in to the
decision table created in my local Guvnor.

ClientRequest request = new
ClientRequest("http://localhost:8080/drools-guvnor/rest/packages/KissProcessGenerator.FunctionProcessGenerator/assets/FunctionDecisionTable/source");
String username = "admin";
String password = "admin";
String base64encodedUsernameAndPassword = base64Encode(username + ":" +
password);
request.header("Authorization", "Basic " +
base64encodedUsernameAndPassword);
request.accept("text/plain");
			
String content = null;
try {
	content = (String)request.get().getEntity(String.class);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
GuidedDecisionTable52 dt =
GuidedDTXMLPersistence.getInstance().unmarshal(content);
List<List&lt;DTCellValue52>> list=dt.getData();
List<DTCellValue52> newlist = new ArrayList<DTCellValue52>();
newlist.add(new DTCellValue52(1));//0
newlist.add(new DTCellValue52("YOA2 (Anlæg Sjælland 2)"));//1
list.add(newlist);
dt.setData(list);
String newContent = GuidedDTXMLPersistence.getInstance().marshal(dt);
		
request = new
ClientRequest("http://localhost:8080/drools-guvnor/rest/packages/KissProcessGenerator.FunctionProcessGenerator/assets/FunctionDecisionTable/source");
request.header("Authorization", "Basic " +
base64encodedUsernameAndPassword);
request.body("application/xml", newContent);
try {
	request.put();
	return "SUCCESS";
} catch (Exception e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}

Above code works fine if inserted data is in english but if data to be
inserted is in danish letters alphabets are not stored properly.

Please find attached sreenshot. (Doc1_error.doc)
In screen shot in "Team" column danish letters are displayed as ? symbol.
I want to use charset=ISO-8859-1 for danish letters.

Please let me know how to allow danish letters in guvnor decision table
using above code. Doc1_error.doc
<http://drools.46999.n3.nabble.com/file/n4022029/Doc1_error.doc>  



--
View this message in context: http://drools.46999.n3.nabble.com/Danish-letters-error-in-guvnor-decision-table-tp4022029.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list