Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
13 replies
Subscribers
7 subscribers
Views
4023 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I am calling a rule to generate a set of data which is being send over a JMS Que
moritzw
over 9 years ago
I am calling a rule to generate a set of data which is being send over a JMS Queue.
It seems the output of the rule is ANSI encoded, but I want it to be UTF-8. Is there a way to enforce UTF-8 encoding for rules?
OriginalPostID-161427
OriginalPostID-161427
Discussion posts and replies are publicly visible
0
moritzw
over 9 years ago
PS: -Dfile.encoding=UTF-8 is set on the application server
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
1. What about this other one:
-Dorg.apache.catalina.connector.URI_ENCODING=UTF-8
do you have it in the app server settings?
2. What is the type of output the rule is generating?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 9 years ago
The rule is generating an input for a CSV file.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 9 years ago
The property you mentioned is not in the installation notes, is it? Which parts of the application does it affect?
Thanks, Moritz
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
I don't think this setting applies to your environment unless you're using JBoss. This setting is to ensure that the application server receives the request parameters in the correct encoding from client requests.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 9 years ago
OK. Thanks. I'll try now with this custom function:
@Function
public String convertStringToUtf8(ServiceContext sc, @Parameter String string) throws AppianException {
byte ptext[] = string.getBytes(ISO_8859_1);
String utf8String = new String(ptext, UTF_8);
return utf8String;
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Is that how you were initially returning the string? with a custom function?
Your function should do the trick.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 9 years ago
No, before I was just using a regular function. I am just thinking that this will probably only work if the encoding ist ISO_8859_1. Would be good to find out somehow which encoding the regular function returns.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
I am surprised because a regular function should be returning plain text with nothing associated to it, it might be the smart service where you are using this and not the rule what is setting the encoding.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
moritzw
over 9 years ago
OK. So maybe it's the smart service which sends the JMS then?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>