Reputation: 261
we're using Drools Guvnor in our project and we're using rest api to retrieve package / asset versions. Everything works fine, until we try to use polish chars, like "ł".
For example, we have package named 'test3' and an asset (rule) called "wiek na podstawie PESEL - przedział 3" (name itself is unimportant, important is this "ł" in last word). Retrieving rest xml file for whole package we get a fragment like this:
<assets>
http://localhost:8080/drools-guvnor/rest/packages/test3/asset/wiek%20na%20podstawie%20PESEL%20-%20przedział%203
</assets>
Asside from a Guvnor API's specific typo (it should be /test3/assets, not /test3/asset) this link doesn't work - browser automatically converted the "ł" to UTF-8 equivalent "%C5%82" and threw an error code that looks as if this page was not recognized by REST (incorrect asset name). The " "s works fine as "%20"s, the problem seems to be with the 16b characters.
Is there a solution to this problem?
Upvotes: 1
Views: 349
Reputation: 261
Figured out a simple workaround. Instead of calling {rest-path}/packages/{package-name}/assets/{asset-name} to get the asset info, I call {rest-path}/packages/{package-name}/assets/, to get all the assets in a package.
This is good not only, cause it omits the http request that's not working, but also it avoids multiple requests, which in our case contributes towards proofing an application to race condition problem (when we retrieve all the asset version info and in time between requests someone rebuilds package in Guvnor).
Upvotes: 1