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

Geoffrey De Smet ge0ffrey.spam at gmail.com
Mon Feb 4 04:09:31 EST 2013


Relates to this issue?
   https://issues.jboss.org/browse/JBRULES-2936

Op 04-02-13 07:11, Manasi schreef:
> 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.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list