question

Upvotes
Accepted
43 1 1 4

How to contribute the € Sign to a Text Fid or a Page Row?

How should I create the fieldList for Elektron API? (RSSL 14002)

I use below code nut it fail to send the "€" and I see strange Char instead.
is UTF8 the correct way?

FieldList fieldList = EmaFactory.createFieldList();

fieldList.add(

EmaFactory.createFieldEntry().utf8(Integer.parseInt(Row), "Hello € !"));

or


EmaFactory.createFieldEntry().utf8(1352, "Hello € !" );

EmaFactory.createFieldEntry().utf8(318, "Hello € !" );

elektronrefinitiv-realtimeelektron-sdkrrt
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 69 35 53

@michael.theimer

According to the data dictionary (RDMFieldDictionary), those fields are RMTES_STRING.

ROW80_4    "IRGROW 4"             318  NULL        ALPHANUMERIC       80  RMTES_STRING    80
DSPLY_NMLL "LCL LANG DSP NM"     1352  NULL        ALPHANUMERIC       32  RMTES_STRING    32

To send UTF8 characters in RMTES, you need the special escape characters, as mentioned in this discussion. Therefore, the code looks like this:

        ByteBuffer bbuf = ByteBuffer.allocate(14);
        byte[] partial = {
                  27,//0x1B
                  37,//0x25 
                  48, //0x30 (0) 
                  72,//H
                  101,//e
                  108, //l
                  108, //l
                  111, //o
                  32, //<space>
                  (byte) 226,(byte)130,(byte) 172, //0xE2 0x82 0xAC (€)
                  32, //<space>
                  33 //!
                  };
        bbuf.put(partial);
        
        bbuf.rewind();
        nestedFieldList.add(EmaFactory.createFieldEntry().rmtes(3, bbuf));

After posting this message, the Eikon Quote application showed the following.

1629101298491.png


1629101298491.png (15.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea