I've had a similar mysterious problem a few months back. It turns out that the default character encoding for Macs is "MacRoman", and this is what you get when your run from the command line using "java -jar". However, under other conditions, the default char encoding can be something else, such as UTF-8, or UTF-16. Maybe this is what is happening when you use javaws? This would mean that running the same program in different ways gets you different character encodings. That is what happened to me.
I wasn't using SWT when I discovered this - I was using a Scanner to read lines of input from a text file. I found a quick and dirty solution was to always specify UTF-8 as the encoding when opening Scanners and writing files. I don't know if there's a similar quick and dirty fix for your problem, but I hope you'll know now where to start looking.
On 16 Nov 2010, at 16:30, Kácsor István - Parola Kft. wrote:
> Dear List,
> We have an SWT application, that when run from the console using "java -jar
> ." behaves as expected, but when we run it through its jnlp file (like
> "javaws something.jnlp"), the text input fields behave strangely. When
> entering an "á" character (aacute) it gets converted to some other 1 byte
> code page (as we saw the 0x87 byte in the sent form data), that causes an
> exception like this:
> org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8
> start byte 0x87 (at char #231, byte #127)
> We suspect it is a problem in the environment that javaws creates for the
> java executable, but we ran out of ideas on what else we could check.
> Any help would be greatly appreciated!
> Do not post admin requests to the list. They will be ignored.
> Java-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden