I am new to Java, so please bear with me if this is a very simple problem. I have a JUnit Test, where I have a hard-coded Japanese word assigned directly to a string variable. Now, right after this line is assigned, it turns into "??" that some some some encoding.
public class TestTest extends TestCase {
public void testLocal(){
Locale.setDefault(Locale.JAPAN);
String test = "会社";
assertEquals("会社", test);
}
}
Since this is a test file, I believe that it completely isolates the problem from other user interfaces. Please help me with this. It was 2 days without a decision. Thank you in advance.
source
share