I am using JasperReports report with DejaVu Sans Font. When I try to print the word emissão it not print properly shows some missing characters, with Locale=pt
I am sure that all properties file is in UTF-8 format.
The jxml file is also in UTF-8 format. <?xml version="1.0" encoding="UTF-8"?>
Is there any missing setting?
Is font support UTF-8?
have you checked this link? Unicode Sample
It says that changing the encoding from UTF-8 to ISO-8859-1 should be enough. There is also a custom property "net.sf.jasperreports.export.character.encoding". Hope it helps!
I don't know why this happens but my solution is put emission = emiss\u00E3o in resource properties file instead of emission = emissão may be jasper report lib read resource file bytes only in ASCII.
I found it useful to set pdfEncoding property on textElement like this:
<textField>
<reportElement x="0" y="0" width="554" height="30" uuid="faf3ff08-ecbc-40cb-b82c-529428aadaa4"/>
<textElement>
<font size="8" pdfEncoding="Cp1250"/>
</textElement>
<textFieldExpression><![CDATA[$P{disclaimer}]]></textFieldExpression>
</textField>
Cp1250 corresponds to Windows-1250 which is used for Central European countries e.g. Poland. After setting this property characters came back. I guess it should be possible to do this also for other encodings.
Related
I generate an XML file through C#, and the relevent part looks like this
<ss:Cell>
<ss:Data ss:Type="DateTime">2009-01-18T00:00:00.000</ss:Data>
</ss:Cell>
However it displays in excel as a number , like 41249 that bears no resemblence to the original date. If I right click the cell, and change the format to dd/MM/yyyy or whatever, then it displays the correct date. Anyone know how I can set the format in the XML for how the date is displayed? The data is there, it's just being displayed incorrectly.
In the <Styles> section add
<Style ss:ID="s22">
<NumberFormat ss:Format="yyyy\-mm\-dd"/>
</Style>
then mark your cell with the style:
<Cell ss:StyleID="s22"><Data ss:Type="DateTime">2009-01-21T00:00:00.000</Data></Cell>
Alternatively, open your XML file in Excel, make the change you want, re-save it as XML, then look to see what changed.
I am using SyncFusion for graphics. For that purpose, I am specifically using SfChart component. In this component, I want to be able to format dates as following:
MON,TUE,WED,THU,FRI,SAT,SUN (That means that show only days with capital letters)
To do so, I played with LabelFormat property of ChartAxisLabelStyle in sfChart:
<chart:DateTimeAxis.LabelStyle>
<chart:ChartAxisLabelStyle x:Name="DateAxisLabelStyle" TextColor="{StaticResource HistogramChartAxisLabelColorTheme1}">
<chart:ChartAxisLabelStyle.LabelFormat>
<OnPlatform x:TypeArguments="x:String" iOS="EEE" WinPhone="ddd" Android="EEE" />
</chart:ChartAxisLabelStyle.LabelFormat>
</chart:ChartAxisLabelStyle>
</chart:DateTimeAxis.LabelStyle>
Also, I tried to write converters, but none of them did not work.
Is there a way to overcome this?
Thanks :)
(Cross posted from the GE support groups - now defunct?)
Having trouble using the gs:x extensions to use palettes of icons in an icon
group.
I have loaded the appropriate xmlns:gx="http://www.google.com/kml/ext/2.2"
into the kml header but get the message "Unknown type gs:x
on my Macintosh under GE Google Earth 6.0.3.2197
I suspect this has not been implemented on the Mac version - anybody
with experience on this?
Final code was as follows and it fails on the first gx:s line.
It also fails in the same way if I use the now deprecated x (rather than gx:x)
Also, as shown it follows the kml documentation but I think all terminating terms should be of the form /gx:x rather than gx:x/
as shown in the KML reference. Making that change does not help as it never gets to that point anyway.
The header was copied from a GE placemark copied and pasted into the
editor.
Any help appreciated.
Bob J.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<StyleMap id="s_Ic_SP">
<Pair><key>normal</key><styleUrl>#sn_Ic_SP</styleUrl></Pair>
<Pair><key>highlight</key><styleUrl>#sh_Ic_SP</styleUrl></Pair>
</StyleMap>
<Style id="sn_Ic_SP">
<IconStyle>
<scale>1.8</scale>
<Icon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</Icon>
<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
<displayMode>default</displayMode><bgColor>ff00d0ff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><table
bgcolor="#ff8000" cellspacing="3" width="160">
<tr bgcolor="#ffff80"><td><b>Sponsor $[name]</b><br/><br/>$
[description]</td></tr></table>]]></text>
</BalloonStyle>
<LabelStyle>
<scale>0.9</scale><color>ff00ffff</color>
</LabelStyle>
<LineStyle><color>ff00ffff</color><width>2.0</width></LineStyle>
<ListStyle>
<ItemIcon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</ItemIcon>
</ListStyle>
</Style>
etc.
Oooops
Seems my problem was a syntax problem
The gx:x set do work correctly. However, they are not operational inside the ItemIcon group as shown in my example. In fact they are ignored in that group.
Thanks for your tolerance of my stupidity
Bob J.
Using 4.5.0 for numerous reports, each using the same datafield SVC_METH_NM. Have no problem word wrapping (using Stretch With Overflow) the datafield SVC_METH_NM unless the field is a group. When the field is a Group, the data is truncated instead of wrapped. If I set the Evaluation Time to Now, which blanks out the Evaluation group, it wraps correctly (but the report doesn't display properly). I tried removing the fields in the line immediately below, and have tried playing with the Position Type and Stretch Type options, to no avail.
<group name="ServiceMethodName">
<groupExpression><![CDATA[$F{SVC_METH_NM}]]></groupExpression>
<groupHeader>
<band height="20">
<textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="ServiceMethodName">
<reportElement x="23" y="0" width="180" height="20" printWhenGroupChanges="ServiceMethodName"/>
<textElement>
<font isBold="true" isItalic="false"/></textElement>
<textFieldExpression><![CDATA[$F{SVC_METH_NM}]]></textFieldExpression>
</textField>
Has anyone else run into this?
I am dealing with this issue right now. Did you find a solution? I was hoping to avoid it, but think I'll have to try and solve the problem using subreport(s). Fairly certain I can display the text appropriately that way, but feel like I shouldn't have to overcomplicate things with subreports.
Edit: TESTED SOLUTION - Put a subreport in your group header. Query for the subreport should be "select * from dual" since you will actually be passing all data in from the master report. Pass the field(s) to the subreport as parameters, and display them exactly as you would in the group header, but do it in the detail band. iReport will handle the wrapping of the text since it's in the detail band. Make sure Print When Detail Overflows is set on the subreport, and Stretch With Overflow is set on your subreport field.
If any body else have solution on this please replay.
I'm using Struts2 and getText method to fill i18n and text tags.
For example I use:
free.text.search.label=české On-line Hledat
č is a HTML code for special character č (Czech Republic). I want to use in properties file.
But in my JSP, I get : české On-line Hledat instead of české On-line Hledat
I use this to display text on my JSP:
<s:label for="searchInput" value="%{getText('free.text.search.label')}" />
So what's the error? Actually this problem i am facing for label as well for button.
Use \u010D instead of č
.properties
free.text.search.label=\u010Deské On-line Hledat
.jsp
<s:label key="free.text.search.label" />
Output
české On-line Hledat
How I solved it?
Just paste české On-line Hledat into .properties file in my IDE (Eclipse).
Or
See
Unicode Character 'LATIN SMALL LETTER C WITH CARON'
(Encodings > C/C++/Java source code)
A to Z Index of Unicode Characters
Unicode Character Search
Well i am not able to understand your issue properly
but few points i would like to mention here
<s:label for="searchInput" value="%{getText('free.text.search.label')}" />
use key in place of this to make this more easy to read and maintain
like
<s:label for="searchInput" key="free.text.search.label" />
also since meta tags are no longer applicable to struts2 so you can try using this
<%# page contentType="text/html;charset=UTF-8" %>
<%# taglib prefix="s" uri="/struts-tags" %>
May be this will help you to display special characters correctly