Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Displaying a trademark symbol!
Displaying a trademark symbol! [message #775263] Thu, 05 January 2012 12:00 Go to next message
Dan  is currently offline Dan
Messages: 6
Registered: November 2011
Junior Member
Hi --

I've searched the forums and web but haven't found this question addressed...

I have been trying to display a trademark symbol in my report. In a text field, I set it to "html" and enter text like this:

<I>Does Italics work?</I> Company&trade;

It displays correctly in:
1. Birt's Preview mode
2. Using the PDF renderer

It displays incorrectly using the HTML renderer.

In all cases, the characters in italics display correctly. With the HTML renderer, the trademark is displayed as some odd character (â„¢)

Is there a trick to getting dingbats and other characters to display?

Thanks much,
Dan
Re: Displaying a trademark symbol! [message #775319 is a reply to message #775263] Thu, 05 January 2012 14:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Dan,

What version of BIRT are you using?

Jason

On 1/5/2012 12:00 PM, Dan wrote:
> Hi --
>
> I've searched the forums and web but haven't found this question
> addressed...
>
> I have been trying to display a trademark symbol in my report. In a text
> field, I set it to "html" and enter text like this:
>
> <I>Does Italics work?</I> Company&trade;
>
> It displays correctly in:
> 1. Birt's Preview mode
> 2. Using the PDF renderer
>
> It displays incorrectly using the HTML renderer.
>
> In all cases, the characters in italics display correctly. With the HTML
> renderer, the trademark is displayed as some odd character (â„¢)
>
> Is there a trick to getting dingbats and other characters to display?
>
> Thanks much,
> Dan


Jason Weathersby

BIRT Exchange
Re: Displaying a trademark symbol! [message #775424 is a reply to message #775319] Thu, 05 January 2012 19:20 Go to previous messageGo to next message
Dan  is currently offline Dan
Messages: 6
Registered: November 2011
Junior Member
I'm on version 3.7.1
Re: Displaying a trademark symbol! [message #775739 is a reply to message #775424] Fri, 06 January 2012 10:56 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Dan,

I just tried this in 3.7.1 and it worked for me. Can you try the
attached report?

Jason

On 1/5/2012 7:20 PM, Dan wrote:
> I'm on version 3.7.1
  • Attachment: tm.zip
    (Size: 0.74KB, Downloaded 72 times)


Jason Weathersby

BIRT Exchange
Re: Displaying a trademark symbol! [message #775954 is a reply to message #775739] Fri, 06 January 2012 20:59 Go to previous messageGo to next message
Dan  is currently offline Dan
Messages: 6
Registered: November 2011
Junior Member
This is interesting! Wink

I ran your tm.rptdesign report under the ReportEngine genReport.bat script. When I displayed the generated tm.html file, at first glance it looked like it was rendered correctly. But on closer inspection, I found that the trademark symbol was stored as the following hex characters:
e2 84 a2
rather than the string "&trade;". I believe that e2 82 a2 is the UTF-8 encoding for a trademark symbol.

Here's a paste of the part of the generated html file in question:
<td valign="top">
<div style=" overflow:hidden;"><i>Does Italics work?</i> Company™</div>
</td>

For some reason, it seems that birt is translating the characters to UTF-8, even "&trade;". Odd?

Dan



Re: Displaying a trademark symbol! [message #776961 is a reply to message #775954] Mon, 09 January 2012 10:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Dan

I believe that is the default for html emitter.

Jason

On 1/6/2012 8:59 PM, Dan wrote:
> This is interesting! ;)
>
> I ran your tm.rptdesign report under the ReportEngine genReport.bat
> script. When I displayed the generated tm.html file, at first glance it
> looked like it was rendered correctly. But on closer inspection, I found
> that the trademark symbol was stored as the following hex characters:
> e2 84 a2
> rather than the string "&trade;". I believe that e2 82 a2 is the UTF-8
> encoding for a trademark symbol.
>
> Here's a paste of the part of the generated html file in question:
> <td valign="top">
> <div style=" overflow:hidden;"><i>Does Italics work?</i> Company™</div>
> </td>
>
> For some reason, it seems that birt is translating the characters to
> UTF-8, even "&trade;". Odd?
>
> Dan
>
>
>
>


Jason Weathersby

BIRT Exchange
Re: Displaying a trademark symbol! [message #777073 is a reply to message #776961] Mon, 09 January 2012 14:48 Go to previous message
Dan  is currently offline Dan
Messages: 6
Registered: November 2011
Junior Member
Hi Jason,

Yes, it does seem that the html emmitter is programmed to convert a trademark to the UTF-8 equivalent. It seems like the symbol should be emitted as "&trade;" since that is a more portable html output. In any case, now that I understand its behavior I can work around it (which I'm doing by converting the UTF-8 chars to "&trade;" -- modifying the html emitter code seems more daunting!).

Thanks so much for your help in getting to the bottom of this!

Dan
Previous Topic:Reg: Masterpage in pdf files
Next Topic:BIRT installation causing problem
Goto Forum:
  


Current Time: Mon Apr 21 08:49:18 EDT 2014

Powered by FUDForum. Page generated in 0.07888 seconds