User should check that compiling the Java source is done with the appropriate setting. (Editing in UTF-8 and compiling with a default of ISO-8859-x produces incorrect literals in the .class.)
I don't know whether some Request encoding may need to be set - don't know where the ClientRequest documentation is to be found. To escape the MSanity ( my nice way of saying it ;-) ) it might be advisable to encode anything outside US-ASCII using the \uXXXX form prior to insertion into the .xls. It should be possible to keep it like this if Java sources are created from cell contents. -W On 04/02/2013, Geoffrey De Smet <[email protected]> wrote: > 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<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 >> [email protected] >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
