For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
75 1 3 7

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 512.0 KiB each and 1.0 MiB total.

Hello @michael.theimer ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

@michael.theimer

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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