Part of the EllisLab Network

Bug Report

XML-RPC Class do not provide conversion of special characters

Date: 06/01/2008 Severity: Trivial
Status: Bogus Reporter: m.baumgart
Version: 1.6.2
Keywords: Libraries, XML-RPC Class

Description

Sending XML requests with e.g. german special characters like äöüß lead to invalid XML requests. XML Servers repsonse “Internal protocol error: Missing end tag for ‘string’ (got “value”)”, because they cut the whole rest of the request.

An interface for users is needed to extend the XML-RPC Class with a function which converts language specific characters to XML Valid.

Expected Result

Following the XML coding for german special chars:

Ä    Ä
Ö    Ö
Ü    Ü
ä    äö    ö
ü    ü
ß    ß

Actual Result

Do not do any conversion. So an ä is an ä in the request, but this will be cut of by the server.

Comment on Bug Report

Page 1 of 1 pages
Posted by: m.baumgart on 1 June 2008 5:40am
no avatar

Sorry, I do not know hoy to write the code in the expected result. The table could be found here: http://www.devtrain.de/news.aspx?artnr=296

Posted by: m.baumgart on 1 June 2008 6:21am
no avatar

I wrote an helper for that purpose, but actually this code works only when I used it directly for each string before the xml-rpc functions but not with the helper.

function string_conversion_xml($string)
{
 
  $string = ereg_replace(”Ä”, ”Ä”, $string);
  $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;
}

Posted by: Derek Jones on 1 June 2008 7:39am
Derek Jones's avatar

Greetings,

I do not see a forum thread associated with this bug report, and it looks like it may not be a bug.  Have you first read the bug reporting guidelines and used the Bug Report Forum to get help confirming that this is a bug before reporting?

When you start a forum discussion on the topic, you might mention what character set your data is in, the XML data you are trying to send, and the associated code.  You’ll need to clarify too whether you are desiring to convert from entities or to entities, as it’s unclear from your description and code sample.

Thanks!

Posted by: m.baumgart on 1 June 2008 10:59am
no avatar

Sorry, now posted as in the Bug thread.
http://codeigniter.com/forums/viewthread/81103/

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?