Home » Language IDEs » Java Development Tools (JDT) » Kepler problem with "unicode" text(Kepler does not recognize some keyboard symbols, such as "plus minus")
Kepler problem with "unicode" text [message #1069274] |
Mon, 15 July 2013 15:17 |
John St Ledger Messages: 3 Registered: July 2013 |
Junior Member |
|
|
I'm using Eclipse on a Mac (OS X 10.8.3)
I was using Helios Service Release 2, and am now switching to the Kepler Release. In my Java source files I have multiple occurrences of ≥ (greater than or equal), ± (plus of minus), etc. in Strings that will be displayed in the user interface to some applications I developed. I typed these characters in using the keyboard, not as a unicode character.
In Kepler, these characters are showing as unknown--the question mark inside the diamond symbol. If I try to save the files, I get a message saying:
I've tried changing the encoding from ASCII to UTF-8 on my source files, and this doesn't help. If I type the character from the keyboard, it shows in the source file correctly, and displays correctly in my applications. Is there some way to correct this problem, other that finding every instance and inputting the correct character again?
Thanx,
John
|
|
| |
Re: Kepler problem with "unicode" text [message #1069530 is a reply to message #1069369] |
Tue, 16 July 2013 04:07 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
John,
If the file itself is already encoded with Mac Roman, you'll need to
read it with that encoding, then change the encoding, and then save it
(or fix the corrupt characters manually before saving) . Changing the
encoding of an existing file is only helpful for changing it to an
encoding that matches how the bytes are already encoded, i.e., I think
it doesn't convert the file. Note that there are workspace, and project
level settings for the default encoding; the latter is better if you
plan to share the files with others (and using an encoding common across
platforms, such as UTF-8 is also wise). Probably best it so avoid the
problem entirely and escape them...
On 15/07/2013 9:01 PM, John St Ledger wrote:
> I found out what caused the problem. In Helios, on the Mac, the
> default text file encoding is Mac Roman. (File > Properties) This is
> not a file type allowed under Kepler. I still need to know if someone
> has a quick fix to resolve the issue.
>
> Thanx,
>
> John
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Kepler problem with "unicode" text [message #1069857 is a reply to message #1069530] |
Tue, 16 July 2013 18:45 |
John St Ledger Messages: 3 Registered: July 2013 |
Junior Member |
|
|
Ed Merks wrote on Tue, 16 July 2013 00:07John,
If the file itself is already encoded with Mac Roman, you'll need to
read it with that encoding, then change the encoding, and then save it
(or fix the corrupt characters manually before saving) . Changing the
encoding of an existing file is only helpful for changing it to an
encoding that matches how the bytes are already encoded, i.e., I think
it doesn't convert the file. Note that there are workspace, and project
level settings for the default encoding; the latter is better if you
plan to share the files with others (and using an encoding common across
platforms, such as UTF-8 is also wise). Probably best it so avoid the
problem entirely and escape them...
On 15/07/2013 9:01 PM, John St Ledger wrote:
> I found out what caused the problem. In Helios, on the Mac, the
> default text file encoding is Mac Roman. (File > Properties) This is
> not a file type allowed under Kepler. I still need to know if someone
> has a quick fix to resolve the issue.
>
> Thanx,
>
> John
Ed,
Thank you. I used your suggested approach, and it worked well. A key point was that the text encoding selection does not convert the file.
John
|
|
|
Goto Forum:
Current Time: Sat Jan 25 22:32:01 GMT 2025
Powered by FUDForum. Page generated in 0.03229 seconds
|