Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Fix (#9) Weird behavior with some characters appearing string arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
andreybratus committed Sep 26, 2016
1 parent 6e76928 commit d0728d9
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static enum CallType {
@Parameterized.Parameters(name = "{index}: {1}")
public static Collection<?> parameters() {
return Arrays.asList(new Object[][]{
{"smallab","simple-transform", "csv", CallType.sync},
{"osterie", "mass-edit", "csv", CallType.sync},
{"osterie", "column-addition", "csv", CallType.sync},
{"osterie", "column-removal", "csv", CallType.sync},
Expand Down
4 changes: 4 additions & 0 deletions engines/engines-core/src/test/resources/inputs/smallab.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"col1","col2"
"Á","Á"
"B","B"
"Č","Č"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
col1,col1_new,col2,col2_new
Á,A,Á,Á
B,B,B,B
Č,Č,Č,C
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"op": "core/column-addition",
"description": "Create column col1_new at index 1 based on column col1 using expression grel:value",
"engineConfig": {
"mode": "row-based",
"facets": []
},
"newColumnName": "col1_new",
"columnInsertIndex": 1,
"baseColumnName": "col1",
"expression": "grel:value",
"onError": "set-to-blank"
},
{
"op": "core/column-addition",
"description": "Create column col2_new at index 3 based on column col2 using expression grel:value",
"engineConfig": {
"mode": "row-based",
"facets": []
},
"newColumnName": "col2_new",
"columnInsertIndex": 3,
"baseColumnName": "col2",
"expression": "grel:value",
"onError": "set-to-blank"
},
{
"op": "core/mass-edit",
"description": "Mass edit cells in column col1_new",
"engineConfig": {
"mode": "row-based",
"facets": []
},
"columnName": "col1_new",
"expression": "value",
"edits": [
{
"fromBlank": false,
"fromError": false,
"from": [
"Á"
],
"to": "A"
}
]
},
{
"op": "core/mass-edit",
"description": "Mass edit cells in column col2_new",
"engineConfig": {
"mode": "row-based",
"facets": []
},
"columnName": "col2_new",
"expression": "value",
"edits": [
{
"fromBlank": false,
"fromError": false,
"from": [
"Č"
],
"to": "C"
}
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private boolean applyOperations(String handle, JSONArray transform)
pairs.add(new BasicNameValuePair("operations", transform.toString()));

response = doPost("/command/core/apply-operations",
new UrlEncodedFormEntity(pairs));
new UrlEncodedFormEntity(pairs, "UTF-8"));

JSONObject content = decode(response);
if (content == null) {
Expand Down

0 comments on commit d0728d9

Please sign in to comment.