Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
J9, Windows
Description
java.io.File doesn't properly work with the file names which has non-latin chars on Windows (I tried Russian) .
Minimal test case:
import java.io.File;
import junit.framework.TestCase;
public class FileEncodingTest extends TestCase {
private File russianNamedDir;
protected void tearDown() throws Exception
{ russianNamedDir.delete(); }public void testCreateNonLatinDirectory() throws Exception
{ russianNamedDir = new File("c:\\temp\\\u0440\u0443\u0441_dir"); //coded 'rus' in Russian transliteration. russianNamedDir.mkdirs(); assertTrue(russianNamedDir.isDirectory()); }}
The very important thing here is that Control Panel > Regional And Language Options > Regional Options tab > "Standards and formats" setting is set to "English US". All other regional settings (location, language for non-unicode programs) are set to Russian. If I switch "Standards and formats" to Russian everything works fine.
Same problem with other extended unicode chars.
Attachments
Issue Links
- duplicates
-
HARMONY-3656 [classlib][luni] File.mkdir does not support unicode
- Closed