[Solved] How can i add latin5 character?


Javadoc of Properties.load(InputStream inStream) says:

The input stream is in a simple line-oriented format as specified in load(Reader) and is assumed to use the ISO 8859-1 character encoding; that is each byte is one Latin1 character. Characters not in Latin1, and certain special characters, are represented in keys and elements using Unicode escapes as defined in section 3.3 of The Java™ Language Specification.

That means, e.g.

All_Axes=Tüm Eksenler

should be

All_Axes=T\u00FCm Eksenler

However, if you have control over how the property file is read, you can use Properties.load(Reader reader) instead. That way, you can control the character set and your file will work, as-is:

Properties props = new Properties();
try (Reader in = new InputStreamReader(new FileInputStream("/path/to/my.properties"),
                                       "ISO-8859-9"/*or "latin5"*/)) {
    props.load(in);
}

solved How can i add latin5 character?