I have geoserver installed with Tomcat and the text labeling do not display correctly . where can i set the Arabic encoding in geosever?
the labeling appear well in QGIS but when i publish it in geoserver i get this problem .
]1
The shape file
Here Is the SLD :
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
<sld:UserLayer>
<sld:LayerFeatureConstraints>
<sld:FeatureTypeConstraint/>
</sld:LayerFeatureConstraints>
<sld:UserStyle>
<sld:Name>sea</sld:Name>
<sld:Title/>
<sld:IsDefault>1</sld:IsDefault>
<sld:FeatureTypeStyle>
<sld:Name>group 0</sld:Name>
<sld:FeatureTypeName>Feature</sld:FeatureTypeName>
<sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
<sld:SemanticTypeIdentifier>simple</sld:SemanticTypeIdentifier>
<sld:Rule>
<sld:Name>default rule</sld:Name>
<sld:PolygonSymbolizer>
<sld:Fill>
<sld:CssParameter name="fill">#1B9E77</sld:CssParameter>
<sld:CssParameter name="fill-opacity">0.5</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter name="stroke">#1B9E77</sld:CssParameter>
</sld:Stroke>
</sld:PolygonSymbolizer>
<sld:TextSymbolizer>
<sld:Label>
<ogc:PropertyName>ARABIC</ogc:PropertyName>
</sld:Label>
<sld:Font>
<sld:CssParameter name="font-family">Arial</sld:CssParameter>
<sld:CssParameter name="font-size">12.0</sld:CssParameter>
<sld:CssParameter name="font-style">normal</sld:CssParameter>
<sld:CssParameter name="font-weight">bold</sld:CssParameter>
</sld:Font>
<sld:LabelPlacement>
<sld:PointPlacement>
<sld:AnchorPoint>
<sld:AnchorPointX>0.5</sld:AnchorPointX>
<sld:AnchorPointY>0.5</sld:AnchorPointY>
</sld:AnchorPoint>
</sld:PointPlacement>
</sld:LabelPlacement>
<sld:Fill>
<sld:CssParameter name="fill">#000000</sld:CssParameter>
</sld:Fill>
<sld:VendorOption name="spaceAround">2</sld:VendorOption>
</sld:TextSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:UserLayer>
</sld:StyledLayerDescriptor>
The most common problem is that you have miss set the character encoding, check the store page:
With my test data I get this with a setting of "windows-1250"
Switching to the (in my case) correct "UTF-8" gives this, which is better.
And finally using a "better" font than Arial (Trocchi) fills out the Chinese as well as the Arabic characters.
Update
So experimenting with your shapefile and SLD and googling "windows arabic character set" led me to setting the Shapefile datastore DBF character set to "Windows-1256" which seems to work.
Related
I have configured in TS setup: markerFile = path to file de.locallang_marker.xlf
<trans-unit id="p_category" resname="p_category" approved="yes">
<source>Category</source>
<target state="final">Kategorie</target>
</trans-unit>
How do I use this now in the template?
Since tt_products uses "old style templates" with markers, the markers used in the template are mainly used to fetch data from the DB like ###CATEGORY_TITLE###. But I havn't seen anywhere in the example templates markers to get some translated texts!
Help appreciated
Regards
Karl-Heinz
found the solution:
I used:
###p_category###
but it must be in capital letters
###P_CATEGORY###
I have edited Preferences.tps file from my tableau repository to add following code -
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="regular">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Upon restarting the Tableau, I still can't see my color pallet in there. I tried searching online for possible solutions and have even replaced the code with custom codes available online. No luck though!
For continuous/ordered data, the type of the color palette would need to be "ordered-sequential" or "ordered-diverging".
See the link below for more info about creating a custom palette and with examples of various types.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.html
For example:
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="ordered-diverging">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Ordered-diverging above produces:
If there are multiple versions of Tableau installed, try testing the custom colors on default one. it works.
Currently I try to fix a issue on our SocialEngine installation (which is built on Zend) which shows in the language selector one language not in its native name (like "Deutsch" for "German") but in the language the user has set the frontend (so instead of "Deutsch" you would see "German" when you set the language to English).
When looking in the source I've seen that Zend_Locale_Data loads a list of languages which are available for the system and tries to read a LDML file from a path which seems not to be on my machine:
$temp = self::_getFile($locale, '/ldml/localeDisplayNames/languages/language', 'type');
When the path is not on my computer, it has to be in the web but doing a search for "ldml" or "zend ldml" I don't get any hint on this topic. Could you guide me through the fog?
Any help is appreciated. Thank you!
The '/ldml/localeDisplayNames/languages/language' that you see is not a file path but a XPath expression, the file that is read is an XML file located in Zend/Locale/Data/ and the filename is related to the given $locale parameter.
e.g. For the english locale, the XML file loaded should be Zend/Locale/Data/en.xml. Opening this file will show you the structure selected by the XPath expression
<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
<!-- content skipped -->
<localeDisplayNames>
<!-- content skipped -->
<languages>
<language type="aa">Afar</language>
<language type="ab">Abkhazian</language>
<!-- etc... -->
So, I've got a class with contains a NSMutableArray of CLLocation's, and a name.
Now I want to save them to KML, ideally as a track (or , so I can use the file to display the locations traveled.)
How would I go about this?
I don't expect code, more guidance (I'm new to Objective-C and KML, so got a lot to learn! :) )
I haven't used either of these, but here's a couple of libraries that turned up in a search:
http://github.com/incanus/Simple-KML/
http://developmentseed.org/blog/2010/aug/12/kml-parsing-library-released-apples-ios-platform
Edit: it looks like both those libraries are parsers, not writers. You may have to create your own writer.
I'd say that using either of these libraries would save you a lot of time. That said, have a look at how KML is formed. It's just XML and making a track is really easy. Here's an example:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1" xmlns:trails="http://www.google.com/kml/trails/1.0">
<Document>
<name>RK_Running.kml</name>
<Placemark>
<name>Running 12/9</name>
<Style>
<LineStyle>
<color>ff0000ff</color>
<width>4</width>
</LineStyle>
</Style>
<MultiGeometry>
<LineString>
<tessellate>1</tessellate>
<coordinates>
138.968309,35.716577,17.0
138.967998,35.716859,17.0
138.967526,35.717252,20.0
138.967055,35.717494,20.0
</coordinates>
</LineString>
</MultiGeometry>
</Placemark>
</Document>
</kml>
Save this as a .kml and it will open in Google Earth
KML is just XML. I'd suggest you create something like what you're looking for using Google Earth. Save it as KML and open it with a text editor to get an idea of what you need to output.
You can generate XML using libxml2 or KissXML
In my earlier post there was a problem with JSF charset handling, but also the other part of the problem was MySQL connection parameters for inserting data into db. The problem was solved.
But, I migrated the same application from JSP to facelets and the same problem happened again. Characters from input fields are replaced when inserting to database (č is replaced with Ä), but data inserted into db from sql scripts with proper charset are displayed correctly. I'm still using registered filter and page templates are used with head meta tag as following:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
If I insert into h:form tag the following attribute:
acceptcharset="iso-8859-2"
I get correct characters in Firefox, but not in IE7.
Is there anything else I should do to make it work?
Thanks in advance.
Add the following line to the filter:
response.setContentType("text/html;charset=ISO-8859-2");
Don't use acceptcharset attribute. IE has serious bugs with it.
Also, when you're using a <?xml?> declaration in top of Facelets XHTML page, ensure that it's using the desired charset or just remove the whole declaration, it's not strictly required.
<?xml version="1.0" encoding="ISO-8859-2"?>
i think you can see the implementation of org.springframework.web.filter.CharacterEncodingFilter
and you can start your tomcat by adding -Dfile.encoding=ISO-8859-2 as jvm arguments