-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

James,

On 8/24/16 3:46 PM, James H. H. Lampert wrote:
> On 8/24/16, 12:36 PM, Mark Thomas wrote:
> 
>> At a guess, something in the web application is using the
>> platform default encoding rather than an explicit encoding. Given
>> that the Linux box is OK, it looks like the app should be
>> explicitly using UTF-8 everywhere.
> 
> Based on a response I got on the Midrange Java List, and on what
> I'd found since I entered the query, I would agree.
> 
> What's the best way to accomplish this?

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

If you also want to change the default platform encoding, you'll have
to do the following (or equivalent on your E4A):

1. Edit CATALINA_BASE/bin/setenv.sh (or create it)
2. Add this line:

   export CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8"

The above should change the values on the E4A's JVM so that everything
reports UTF-8 and nothing reports ISO-8859-1. The "UnicodeBig" is the
internal encoding that the JVM uses to represent Java primitive "char"
type and will probably only work with the value you've got there...
don't try to mess with that! :)

FWIW, the system properties of each JVM are somewhat interesting, but
probably won't help you debug anything. It might not even fix anything.

Every HTTP request/response is defined to have a character encoding:

1. As specified in the Content-Type header
2. To be ISO-8859-1 as the default in case no header exists

"Most" client software these days actually defaults to sending
requests without a Content-Type character encoding and instead just
using  "whatever character encoding the server sent this page to me
using" as the character encoding. That's usually not the case with
back-end software, which is likely the case with your app.

Presumably, your application uses IMAP or similar to contact the gmail
server? In that case, HTTP isn't in use and it's possible that the
system properties defining the system character encoding are in use.
It all depends upon how the software works under the hood.

If HTTP is in use, here, then the problem exists in some component not
following the spec. Tomcat isn't part of the the problem, there. If
some other protocol is in use, it's entirely possible that default
"platform" (as defined by system properties) encoding is being used.
The only solution there would be to change the file.encoding property
as I've described above.

Let us know how it goes.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXvhPQAAoJEBzwKT+lPKRY97kQAKPNSiS+6ZHWd/XvfgQMsGMB
zF/+gD75swub3qjz93vYYwG/OCykNE7ljpZJva3VNXdHwfnPkPe9xL4Kbn5uH/0i
CA4zztQW89Mkdhe9tGa4LDCv4tDWQGLhvKiGu3moFzcjKMSHTyIQe6wByX4SUk5N
HCbHf39avr6So60G55i7vWBPkeU9Du8Oa0T/X3NOlAlBIoSiDm2HKdvwb+3Fmeqn
W7JytdcRxoS5VwkIJFa3lsFt77Rz3ROV7KnCl7wrCVaxPs0RIM7DI9ojzzbMLt2s
S+nArR4gKwR0A5js+nRGJ/H53m1qiqUGvpb6HmUUz2pVSpTejGQFwVANwf54+IUY
uQKxud5XkB+JDN4f7+7ZKUn2l4kgrtYJxxyr2bzzYmHu3Z0AAMAqt78ZI7DYdCBZ
B0Gpdx6DPV0czsQs4g/usmF3M3hbAhkozYi7U5tzZfmUg2rIBfHKo4bX0GMEznJ9
5HvVJpRyLUPnXkA85wPi3aJwuvavFb9r51Kg17Vhuj74qcEacH4RwydE2vPRmVm1
WovpPjP0rwIpmJJlYq+RzzSXkYShiOZftqOKOeH/XSO+IwpQS2MlYpFUNiLpU4Y7
7qhatQQMcbmBHEFJ7jI1gJs/jkChm3iUWicOwju0XWoTshg0wEA3tEhGgZe8laN9
kLp4YiKoxMDPDX5uFQvO
=uvDy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to