5 messages in com.mysql.lists.javaRe: Tough one| From | Sent On | Attachments |
|---|---|---|
| Rikard Froberg | 17 May 2004 07:11 | |
| Emmanuil Batsis (Manos) | 17 May 2004 07:17 | |
| Rikard Froberg | 17 May 2004 07:23 | |
| Rhino | 17 May 2004 08:45 | |
| Jeff Mathis | 17 May 2004 09:03 |
| Subject: | Re: Tough one![]() |
|---|---|
| From: | Jeff Mathis (jmat...@predict.com) |
| Date: | 05/17/2004 09:03:29 AM |
| List: | com.mysql.lists.java |
I've seen issues like this before. It had to do with running the java executable from the JDK versus the JRE. For some reason, the character set understood by the JRE at that time was only a subset of that understood by the JDK. this was all with version 1.3
jeff
Rikard Froberg wrote:
Hi all, This is really a Debian/Java question, so sorry for intruding.
Our testserver reads pages from a MySQL database using Java 3 (Blackdown-1.3.1-02b-FCS).
All of a sudden (for me as a Java developer) the text that contained non ascii, specifically "§", was not understood by the Java program.
The test of a char c containg a '§' from mysql:
if c=='§'
suddenly failed for no apparent reason.
The same test on the same input on our production server, kept working (thank Lord).
After a few tests I discovered that reading a '§' from the CLI worked and a testing against a hard coded '§' succeeded.
But when printed to the shell, all that was produced was a '?' in place of all '§'.
The same code _compiled_ on the production server, still managed the test for equality, but also managed to print out the '§' to the shell. Aha.
But when using the class file from the compilation on the faulty test server, no '§' was printed out, but only '?' again. Aha.
So, it seems that something got the compiler (same version) on the test server, to screw up the compilation of a source file contiaing non ascii symbols.
The same source file could be appropriately compiled on the production server, so the error seems to lie somewhere where the compiler reads the source file on the test server.
Any ideas what made this happen?
The temporary fix, was to compare against the integer value of 167 before compilation on the test server, rather than against '§' (which could not be read properly).
Sorry again for posting non mysql issues here, still grateful for any suggestions.
Rikard
-- Jeff Mathis, Ph.D. 505-955-1434 Prediction Company jmat...@predict.com 525 Camino de los Marquez, Ste 6 http://www.predict.com Santa Fe, NM 87505




