Sublime Forum

UTF-8 encoding doesn't work

#1

I’m learning Java and in OS X, but with the latest version of ST, 2.0.2, and the beta build, UTF-8 ASCII encoding doesn’t work in ST Builder.
If I insert char “è” o something like this (also in a comments!!), it says “Unmappable character for encoding ASCII”, replacing “è” with “??”.
I also click on “Reopen with Encoding” > “UTF-8”, but nothing change.
Okay, I can compile it in Terminal, but it is slightly annoying.
What can I do? In che older version (2.0.0 or 2.0.1), it didn’t returns this error.

Thank you.

0 Likes

#2

UP! Someone could help me?

0 Likes

#3

UP! I descovered also that if there is a char like “è”, the builder does not find other errors that Terminal get. :confused:

0 Likes

#4

Have you tried creating a new build system for Java using the encoding parameter?

0 Likes

#5

Thanks for the answer
I wrote in new file:

{
“cmd”: “java”, “encoding ISO-8859”]
}

but when I try to compile, it says:
“Error: impossibile to find or load main class encoding ISO-8859”

(I tried also with ISO-8859-1, how there is wrote in the site you linked me)

What I must do?

EDIT:

I remember that is “javac” and not “java”. Now it says:

“javac: invalid flag: -encoding: ISO-8859-1
Usage: javac
use -help for a list of possible options”

what i must to do? :neutral_face:

0 Likes

#6

[quote=“AnDer”]“javac: invalid flag: -encoding: ISO-8859-1
Usage: javac
use -help for a list of possible options”

what i must to do? :neutral_face:[/quote]

You don’t need to use a colon between the flag and the value.

0 Likes

#7

[quote=“weslly”]

[quote=“AnDer”]“javac: invalid flag: -encoding: ISO-8859-1
Usage: javac
use -help for a list of possible options”

what i must to do? :neutral_face:[/quote]

You don’t need to use a colon between the flag and the value.[/quote]

I delete it, but nothing change.

I put also “-” before encoding, but nothing.

{
“cmd”: “javac”, “encoding ISO-8859-1”],
}

javac: invalid flag: encoding ISO-8859-1
Usage: javac
use -help for a list of possible options
[Finished in 0.1s with exit code 2]

0 Likes

#8

UP, someone found a solution? :confused:

0 Likes

#9

Have you tried:

"cmd": "javac", "encoding", "ISO-8859-1"]
0 Likes

#10

I suppose it must be:

"cmd": "javac", "-encoding", "ISO-8859-1"]

What’s the content of your console after you run the build ?
The executed command must be printed on it.

In addition, I warmly recommend you to use -encoding UTF-8 and forget about custom encoding.

0 Likes