Convert a utf8 encoded string to TaggedText, ä is changed to <0x00E4> for instance.

Convert a utf8 encoded string to TaggedText, ä is changed to <0x00E4> for instance.

Name Type Default Description
Return char *   dest is returned for your convenience.

0 : Error while converting
dest char* - destination buffer. Buffer must have been allocated static or using the alloc function
src char* - source string
char * utf8 = "Preisstörer groß";
// bad idea! The result will be longer than the original!
// char * tagged = alloc (strlen (utf8));
char tagged [4096];
if (utf8_to_tagged (tagged, utf8) == 0)
{
    showmessage ("Conversion failed");
    return -1;
}
showmessage ("%s", tagged); // => "Preisst<0x00F6>rer gro<0x00DF>"

Since
Version 2.1 R1100 (20. Dezember 2008)

Available
priint:comet InDesign® Plug-Ins, comet_pdf

Alphabetic index HTML hierarchy of classes or Java