Breadcrumb
- Sabre Red 360 Software Development Kit Help
- Desktop Red Apps
- Communications in Red Apps
- Sabre System Special Characters
Sabre System Special Characters
Red Apps can pass Sabre GDS (Sabre system) special characters when they communicate with the Sabre system and Sabre emulator and register event listeners. Red Apps that register a command prefix as an action_code
can also send special characters.
Java-based Red Apps send Sabre system special characters to services with the DisplaySpecialCharacters Java class instead of mapping them. Using this class enables services to encode special characters correctly.
Red Apps that use JavaScript send special characters in their redapp.xml
files.
Constraints
The action code in EMU_RESPONSE cannot start with or end with the § character.
You cannot register a service or event listener with the ¶ character in action_code. Use the § character in place of ¶.
Sending Sabre System Special Characters with Java
Add Java code to send special characters to the following services:
-
EMU_COMMAND
-
EMU_RESPONSE
-
com.sabre.edge.cf.emu.ShowInEmulator
-
com.sabre.edge.cf.emu.ExecuteInEmulator
-
com.sabre.edge.cf.host.Communication
-
com.sabre.edge.cf.sws.SWS
-
com.sabre.edge.cf.rest2sg.Rest2Sg
-
com.sabre.edge.cf.host.SDS
-
Event listeners
Sample code is shown below. The sample illustrates how to create the ¤A
string properly.
String command = String.valueOf(DisplaySpecialCharacters.CHANGE.getChar()) + "A";
The cf.common bundle enumerates the Sabre system special characters. The fully-qualified class name is com.sabre.edge.cf.common.DisplaySpecialCharacters . For the complete list of parameters, see the JavaDocs.
Passing Special Characters in redapp.xml
Map special characters in the action_code
attribute in redapp.xml
when Red Apps call the following services and register Event Listeners:
-
EMU_COMMAND
-
EMU_RESPONSE
-
Java-based Red Apps that register event listeners
-
JavaScript Red Apps that register event listeners and JavaScript functions as services
To encode Sabre system special characters in Sabre Scribe scripts, see Encoding Special Characters in Sabre Scribe Scripts.
To send special characters, you are required to encode your redapp.xml
file as UTF-8. It is also recommended that all redapp.xml
files be encoded as UTF-8.
For information about passing special characters in redapp.xml
, see the section that corresponds with the functionality in your Red App in Building a redapp.xml File.
You can copy the symbols in the table below to the action_code
tag.
Character | Symbol in redapp.xml |
---|---|
Change |
¤ |
Cross-of-Lorraine |
¥ |
End item |
§ |
Example: action_code="¤"
Caution
|
Do not use or copy characters that are copied directly from Sabre emulator. Characters that are copied will not be matched properly. |