Welcome Guest, Not a member yet? Register   Sign In
XML-RPC Class do not provide conversion of special characters


I'm sorry that I did a bug report directly. So I try to explain the problem here a bit more in detail.

The Bug report is currently listed at: Bug Report 4618

The Problem is for sending a valid XML via XML-RPC it is necessary to convert language specific special chars in an special coding for XML. That job is currently not done by CI.

If I'll send this request. CI sends it directly without converting the "äöüß".

$request = array('simplerequest string with an äöüß');

But an ä should be coded as

I call with the XML-RPC interface from a CI website to a Ruby On Rails XML-RPC Server. Rails cuts of everything after the special char including the special char it's self. Both sites are implemented completly with UTF-8 encoding.

I wrote an string_helper should doing this job:

function string_conversion_xml($oldstring)
    $string = ereg_replace("Ä", "Ä", $oldstring);
    $string = ereg_replace("Ö", "Ö", $string);
    $string = ereg_replace("Ü", "Ü", $string);
    $string = ereg_replace("ä", "ä", $string);
    $string = ereg_replace("ö", "ö", $string);
    $string = ereg_replace("ü", "ü", $string);
    $string = ereg_replace("ß", "ß", $string);

    return $string;

But this helper doesn't work. The same code for every single variable works correctly as it should.

For me CI should do this work for the complete data transmitted via XML-RPC. Otherwise there is a lot of duplicate code with every XML request. Is it a bug, a missing feature or none?

Yours, Matthias.

[eluser]Derek Jones[/eluser]
It is not necessary to encode characters as entities in a utf-8 XML document; in fact, it's invalid unless you use a DTD or import entity definitions to define those entities; so I'm wondering if the issue you are having is external.

Theme © iAndrew 2016 - Forum software by © MyBB