Problem with accents to insert node with APIs

Problem:
Insert node in requisition with API not show the good node label with accent.

The XML post Data is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<node node-label="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE" foreign-id="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE_10.10.10.10" building="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE">
  <interface snmp-primary="P" status="1" ip-addr="100.79.176.86" descr="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE">    
<monitored-service service-name="ICMP"/>  
</interface> 
</node>
  • In database , the node label is correct
  • The XML Import File is correct
<model-import xmlns="http://xmlns.opennms.org/xsd/config/model-import" date-stamp="2022-08-11T07:12:22.083+02:00" foreign-source="CLICKSHARE" last-import="2022-08-11T07:12:22.364+02:00">
   <node building="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE" foreign-id="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE_10.10.10.10" node-label="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE">
      <interface descr="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE" ip-addr="100.79.176.86" status="1" snmp-primary="P">
         <monitored-service service-name="ICMP"/>
      </interface>
   </node>
</model-import>

but the web interface show a encoding problem ( see screenshoot ).
All configurations use UTF-8 encoding .

Expected outcome:
Insert a node in requisition with API /requisitions/[nameRequisition]/nodes.

OpenNMS version:
22

Other relevant data:

in addition .

When i add a node with web interface, and i synchronize the requisition.
The import file is rewrite with bad encoding for the node added by API , and good encoding for the node add manually.

The import file after Synchronize.

<model-import xmlns="http://xmlns.opennms.org/xsd/config/model-import" date-stamp="2022-08-11T10:32:35.971+02:00" foreign-source="CLICKSHARE" last-import="2022-08-11T10:33:16.430+02:00">
   <node building="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE" foreign-id="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE_10.10.10.10" node-label="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE">
      <interface descr="ÉLÉMENTS_CLIENT_SUITE_SYNGAPORE" ip-addr="100.79.176.86" status="1" snmp-primary="P">
         <monitored-service service-name="ICMP"/>
      </interface>
   </node>
   <node foreign-id="1660206722149" node-label="É test É">
      <interface ip-addr="1.1.1.1" status="1" snmp-primary="P"/>
   </node>
</model-import>```

strange ?
thank , if you have a idea .

fred

Definitely smells like a bug to me.

1 Like