how to embed unicode charactor when using xml input?

35 views
Skip to first unread message

Lu Taodong

unread,
Sep 15, 2014, 6:42:06 AM9/15/14
to dot-net-...@googlegroups.com
Hello,
I am using Siberix Library(version 7.1.105.0). I don't how to embed Unicode character(such as CJK).
I use xml mode. I can't find this kind example in siberix website.
who can explain to me?
Thanks.

siberix

unread,
Sep 15, 2014, 7:06:45 PM9/15/14
to dot-net-...@googlegroups.com
Hi,

Please read below:

1. We do not support any version of Siberix Report Writer below 10.0 anymore. You'd have to upgrade to the latest version. Please be aware that the latest version is not backward compatible to the version that you have. About 6 years ago we spent over a year to help our customers to migrate. At this point all support for older versions is completely ended.

2. In the version 10 you'd need to use an implementation of the Siberix.Report.ICallback interface / public Stream LoadFont(string path) method (see Callback example from the evaluation package available for download at our web site) or using report.Delegates / LoadFontDelegate LoadFontDelegate { get; set; } to return a Syste.IO.Stream with the raw data for the TTF (make sure it is not a TTC) font (preferably Arial Unicode MS) that contains glyphs for the characters you need to display.


System.IO.Stream stream = stream with the required font data.

retort.Delegates.LoadFontDelegate = (path) =>
{
    if (path == "MyFont1")
        return stream;

    return null;
};

<Report>
      <Styles>
          <Style Font="MyFont1"/ Brush="Black">
    </Styles>
...

<Report>

Thank You,
Victor

Lu Taodong

unread,
Sep 15, 2014, 9:38:28 PM9/15/14
to dot-net-...@googlegroups.com
Hello,
I try the latest version, and I want to use "SimSun-ExtB" font to show "𠵅𠮟𠁉𠀦𠁽𠀐𠀑𠁫" (CJK extend, 4 byte character) :

UTF-8 XML file:
<Style Id="Style4" Font="SimSunB" Brush="Black" />
<Text Style="Style4">𠵅𠮟𠁉𠀦𠁽𠀐𠀑𠁫</Text>

C# file:
            report.Delegates.LoadFontDelegate = (path) =>
            {
                if (path == "SimSunB")
                    return new System.IO.FileStream("C:\\simsunb.ttf", System.IO.FileMode.Open);
                return null;
            };

But in the consequence, these Unicode characters can't be shown.
In addition, the PDF converted by word2010 can show these characters. it embed "SimSun-ExtB" font too.

I attach my xml file. would you like to reproduce the issue and help me to fix it?
Report.xml

siberix

unread,
Oct 8, 2014, 4:15:15 PM10/8/14
to dot-net-...@googlegroups.com
Hi,

Siberix Report Writer doesn't support 4 byte Unicode characters.

Thank You,
Victor
Reply all
Reply to author
Forward
0 new messages