0

I have a setup that uses Oracle database->GeoServer->OpenLayers->my JavaScript.

I use the UTF-8 character set in GeoServer and the JavaScript layers. The Oracle instance is configured to use WIN1252 (NLS_CHARACTERSET=WE8MSWIN1252).

So, when I make a request from the JavaScript with the CQL_FILTER with characters such as ç, à, .. I get no results from the database because of the encoding.

What is the best way to deal with this problem of multiple character sets? My opinion is changing the database charset to UTF-8, but unfortunately is to risky, because I'm not the only one using it.

Any suggestions?

JJD
1,5513 gold badges18 silver badges31 bronze badges
asked Jul 18, 2012 at 16:50

1 Answer 1

0

Configuring Tomcat's URI encoding to UTF-8 solved the problem.

Configuring Tomcat's URI encoding:

By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when your encoding is UTF-8, and you are using international characters.

  • Edit conf/server.xml and find the line where the Coyote HTTP Connector is defined. It will look something like this, possibly with more parameters:

     <Connector port="8090"/>
    
  • Add a URIEncoding="UTF-8" property to the connector:

     <Connector port="8090" URIEncoding="UTF-8"/>
    
  • Restart Tomcat

...

https://confluence.atlassian.com/display/DOC/Configuring+Tomcat%27s+URI+encoding

answered Jul 31, 2012 at 17:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.