Re: Unicode and XML

  • From: Brendan Murphy <bmurphy@xxxxxxxxxxxxxxxxxxxxx>
  • To: ftcdev@xxxxxxxxxxxxx
  • Date: Fri, 28 Nov 2008 09:02:56 -0600

Deblauwe Gino wrote:
In xml it's not wise to include the unicode chars by itself, besides of the 5 standard replacements:

'&amp;' => '&'
'&gt;' => '>'
'&lt;' => '<'
'&quot;' => '"'
'&apos;' => '''

You have for each unicode character a proper replacement in xml that is widely supported. So you don't run across heavy encoding problems I included an old piece of VB6 code with an incomplete list (most used codes only)

In beta 11 I included the following update.

- The XML output for the text field of the FTStyleRun is now
base64 encoded. This avoids problems with illegal characters being
introduced into the XML stream. The side affect of this is
programs using older versions of the FTC (1.0 to 1.1) will not be
able to decode the new format. Version 1.2 will read the new
format and the old format, so version 1.2 is backwards compatible.

This covers that problem by encoding binary in the xml stream.

FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in 
the subject field.



Other related posts: