Cleaning the UI and organizing
Build and Test j3270 / Build JAR & Run Tests (Java 21) (push) Successful in 43s
Build and Test j3270 / Build JAR & Run Tests (Java 11) (push) Successful in 59s
Build and Test j3270 / Build JAR & Run Tests (Java 17) (push) Successful in 1m30s

This commit is contained in:
2026-10-02 12:26:58 +00:00
parent 03d5ec0fae
commit dde5918da8
7 changed files with 558 additions and 191 deletions
@@ -0,0 +1,37 @@
package haus.nightmare.lib3270j;
/**
* Version information for lib3270j.
*/
public final class Version {
/**
* Hardcoded fallback release version matching build.gradle and pom coordinates.
*/
public static final String VERSION = "1.2.4";
/**
* Canonical library name.
*/
public static final String NAME = "lib3270j";
private Version() {}
/**
* Retrieves the runtime version string of lib3270j.
* Inspects the package implementation version first (populated when loaded from a JAR),
* and falls back to the compile-time {@link #VERSION} constant if null or blank.
*
* @return the version string (e.g. "1.2.4")
*/
public static String getVersion() {
Package pkg = Version.class.getPackage();
if (pkg != null) {
String implVer = pkg.getImplementationVersion();
if (implVer != null && !implVer.isBlank()) {
return implVer;
}
}
return VERSION;
}
}
@@ -15,6 +15,58 @@ public class CodePageRegistry {
private static final Map<String, CodePage> CODE_PAGES = new LinkedHashMap<>();
private static final Map<String, String> ALIASES = new HashMap<>();
/**
* Standard human-readable codepage option labels for UI dropdowns and menus.
* Covers core SBCS, all 10 Euro variants (1140-1149), Extended SBCS (Arabic,
* Hebrew, Thai, Cyrillic, Turkish), and Mixed/Extended DBCS.
*/
public static final String[] COMMON_CODE_PAGES = {
"037 - US / Canada / Brazil",
"1047 - IBM Open Systems / z/OS Unix",
"500 - International Latin-1",
"273 - Germany / Austria",
"277 - Denmark / Norway",
"278 - Sweden / Finland",
"280 - Italy",
"284 - Spain / Latin America",
"285 - United Kingdom",
"297 - France",
"870 - Eastern Europe / Latin-2",
"871 - Iceland",
"875 - Greece (Greek)",
"1026 - Turkey (Turkish Latin-5)",
"1155 - Turkey (Turkish Latin-5 Euro \u20AC)",
"905 - Turkey (Turkish Latin-3)",
"420 - Arabic Bilingual",
"424 - Hebrew (with Latin)",
"803 - Hebrew Character Set",
"838 - Thai Extended",
"1160 - Thai Euro \u20AC",
"1025 - Cyrillic Multilingual",
"1123 - Cyrillic Ukraine",
"1154 - Cyrillic Euro \u20AC",
"880 - Cyrillic (Russian)",
"1140 - US / Canada (Euro \u20AC)",
"1141 - Germany / Austria (Euro \u20AC)",
"1142 - Denmark / Norway (Euro \u20AC)",
"1143 - Sweden / Finland (Euro \u20AC)",
"1144 - Italy (Euro \u20AC)",
"1145 - Spain / Latin America (Euro \u20AC)",
"1146 - United Kingdom (Euro \u20AC)",
"1147 - France (Euro \u20AC)",
"1148 - International (Euro \u20AC)",
"1149 - Iceland (Euro \u20AC)",
"290 - Japanese Katakana SBCS",
"1027 - Japanese Latin SBCS",
"930 - Japanese Katakana Mixed DBCS",
"939 - Japanese Latin Mixed DBCS",
"935 - Simplified Chinese Mixed DBCS",
"937 - Traditional Chinese Mixed DBCS",
"1388 - Simplified Chinese Extended DBCS",
"1371 - Traditional Chinese Extended DBCS",
"933 - Korean Mixed DBCS"
};
static {
// Register core SBCS codepages
register(new Cp037());