[Geoserver-devel] [JIRA] (GEOS-7210) Character Encoding Issue With JDBC Config

Steve Ikeoka created an issue

GeoServer / BugGEOS-7210

Character Encoding Issue With JDBC Config

Issue Type:

BugBug

Affects Versions:

2.8-RC1, 2.7.2

Assignee:

Unassigned

Components:

JDBCConfig

Created:

24/Sep/15 4:43 PM

Priority:

MediumMedium

Reporter:

Steve Ikeoka

The add(T) method in org.geoserver.jdbcconfig.internal.ConfigDatabase calls “new String(byte)” using the default character set. It should be called using “UTF-8” to be consistent with other code used by the jdbcconfig plugin that performs String / byte conversion:

  1. save(T) in org.geoserver.jdbcconfig.internal.ConfigDatabase
  2. mapRow(ResultSet, int) in org.geoserver.jdbcconfig.internal.InfoRowMapper
  3. save(Object, OutputStream) in org.geoserver.config.util.XStreamPersister

This can cause issues with encoding special characters if the default character set is not UTF-8 (e.g., the degree symbol appearing as °). The workaround for my environment was to add “-Dfile.encoding=UTF-8” when starting the application server.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.0.0-OD-06-002#70102-sha1:82bb17d)

Atlassian logo