优化文本编码识别
This commit is contained in:
parent
e693e7ad11
commit
30674fceb1
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/aaa.txt" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/init.bat" charset="US-ASCII" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/新建文本.txt" charset="GBK" />
|
||||
|
||||
@ -124,7 +124,6 @@ public class JNotepad extends Application {
|
||||
tabPane.getSelectionModel().select(tab);
|
||||
updateStatusLabel(textArea);
|
||||
// 更新编码信息
|
||||
//updateEncodingLabel(newValue);
|
||||
updateEncodingLabel(textArea.getText()); // 更新文本编码信息
|
||||
}
|
||||
}
|
||||
@ -138,6 +137,7 @@ public class JNotepad extends Application {
|
||||
if (file != null) {
|
||||
try {
|
||||
getTXT(file);
|
||||
updateEncodingLabel(((TextArea) tabPane.getSelectionModel().getSelectedItem().getContent()).getText()); // 更新文本编码信息
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -242,6 +242,7 @@ public class JNotepad extends Application {
|
||||
try {
|
||||
a = false;
|
||||
getTXT(file);// 读取文件
|
||||
updateEncodingLabel(((TextArea) tabPane.getSelectionModel().getSelectedItem().getContent()).getText()); // 更新文本编码信息
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user