Discussion:
[Geoserver-users] Encoding Problem
Hugo
2012-11-08 12:10:03 UTC
Permalink
Hello all,

I'm facing some problems with encodings on a RHEL server. When uploading an
SLD through Geoserver interface all portuguese characters are being
converted into a question mark.

I have defined Geoserver character encoding as UTF-8 and my SLD encoding as
well. Nevertheless, geoserver is writing the sld files with us-ascii
encoding. I've tried to force JAVA to use UTF-8 encoding through the option
-DFile.encoding=UTF-8 (tried it on JAVA_OPTS and CATALINA_OPTS) but results
are the same.

The OS lang returned by env | grep LANG is en_US.UTF-8.

What am i missing here?
Thanks in advance.
Regards,
--
Hugo Martins
Hugo
2012-11-09 15:36:33 UTC
Permalink
Hello all,

For the future reference, if someone faces the same, it was a typo when
defining encoding in JAVA_OPTS.

Adding -Dfile.encoding=UTF-8 to JAVA_OPTS in catalina.sh solved the problem.

Cheers,
Hugo
Post by Hugo
Hello all,
I'm facing some problems with encodings on a RHEL server. When uploading
an SLD through Geoserver interface all portuguese characters are being
converted into a question mark.
I have defined Geoserver character encoding as UTF-8 and my SLD encoding
as well. Nevertheless, geoserver is writing the sld files with us-ascii
encoding. I've tried to force JAVA to use UTF-8 encoding through the option
-DFile.encoding=UTF-8 (tried it on JAVA_OPTS and CATALINA_OPTS) but results
are the same.
The OS lang returned by env | grep LANG is en_US.UTF-8.
What am i missing here?
Thanks in advance.
Regards,
--
Hugo Martins
--
Hugo Martins
Andrea Aime
2012-11-09 15:55:44 UTC
Permalink
Post by Hugo
Hello all,
For the future reference, if someone faces the same, it was a typo when
defining encoding in JAVA_OPTS.
Adding -Dfile.encoding=UTF-8 to JAVA_OPTS in catalina.sh solved the problem.
Thanks for sharing :-)

Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
geoadmin
2017-06-29 07:55:30 UTC
Permalink
Hello, this is my firs post.
I'm facing the same problem for couple of days only for croatian digraphs.
I'm running RHEL 7.3 with geoserver 2.10 on top of Tomcat 8.
My server locale setting is LANG=en_US.UTF-8

Unit file looks like this:

[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
Before=shutdown.target


[Service]
Type=forking
User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/var/run/geo1.pid
Environment=CATALINA_HOME=/srv/geo1
Environment=CATALINA_BASE=/srv/geo1
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC
-DGEOSERVER_NODE_OPTS="id:geoserver1"
-DGEOSERVER_DATA_DIR="/geoserver/conf"'
Environment='JAVA_OPTS=-Djava.awt.headless=true
-Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8'

ExecStart=/srv/geo1/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target


Still there is no luck to correctly see some digraphs like e.g. žćč.
In other environment I have RHEL 7.2 and it works ok.

Any help appreciated.




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Encoding-Problem-tp5014812p5325965.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ge
geoadmin
2017-06-30 07:28:59 UTC
Permalink
Problem resolved.

I have installed two packages that comes with firefox

liberation-fonts-common
liberation-sans-fonts

--------------------------

Also, if you anyone encounter problems with custom fonts.
I have placed fonts in GEOSERVER_DATA_DIR/conf/styles. Geserver has logged
that it loaded fonts successfuly, but they were not visible in GUI console.
Then I created directory /usr/local/share/fonts, and placed fonts inside
fonts dir.
After reloading geoserver, everything works fine.

BR,
Jasmin




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Encoding-Problem-tp5014812p5326137.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime
2017-07-01 09:21:28 UTC
Permalink
Post by geoadmin
Problem resolved.
I have installed two packages that comes with firefox
liberation-fonts-common
liberation-sans-fonts
Thanks for sharing your solution.
Post by geoadmin
Also, if you anyone encounter problems with custom fonts.
I have placed fonts in GEOSERVER_DATA_DIR/conf/styles. Geserver has logged
that it loaded fonts successfuly, but they were not visible in GUI console.
Can you explain here? What does it mean that were were successfully loaded
and yet
not visible in the GUI?

Cheers
Andrea
--
Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Loading...