Package com.embabel.common.util
Class WinUtils
-
- All Implemented Interfaces:
public final class WinUtilsUtility class for Windows-specific operations.
-
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerUTF8_CODEPAGE
-
Constructor Summary
Constructors Constructor Description WinUtils()
-
Method Summary
Modifier and Type Method Description final static BooleanIS_OS_WINDOWS()Returns true if the current OS is Windows. final static UnitCHCP_TO_UTF8()Sets the console code page to UTF-8. final static IntegerACTIVE_CONSOLE_CODEPAGE()Returns the active console code page. final static BooleanASCII_TABLE_SUPPORTED()Returns true if the ASCII table is supported. final static BooleanSET_CASCADIA_CODE_FONT(Short fontSize)Sets the console font to Cascadia Code with UTF-8 support. final static BooleanSETUP_OPTIMAL_CONSOLE()Sets up optimal console for Unicode display. -
-
Method Detail
-
IS_OS_WINDOWS
final static Boolean IS_OS_WINDOWS()
Returns true if the current OS is Windows.
-
CHCP_TO_UTF8
final static Unit CHCP_TO_UTF8()
Sets the console code page to UTF-8.
-
ACTIVE_CONSOLE_CODEPAGE
final static Integer ACTIVE_CONSOLE_CODEPAGE()
Returns the active console code page.
-
ASCII_TABLE_SUPPORTED
final static Boolean ASCII_TABLE_SUPPORTED()
Returns true if the ASCII table is supported.
-
SET_CASCADIA_CODE_FONT
final static Boolean SET_CASCADIA_CODE_FONT(Short fontSize)
Sets the console font to Cascadia Code with UTF-8 support. Automatically switches to UTF-8 code page for optimal Unicode display. Preserves the original console font size unless overridden.
- Parameters:
fontSize- Optional font size (if null, preserves current size)- Returns:
true if font was successfully changed, false otherwise
-
SETUP_OPTIMAL_CONSOLE
final static Boolean SETUP_OPTIMAL_CONSOLE()
Sets up optimal console for Unicode display. Tries Cascadia Code first, then falls back to other suitable fonts. Preserves the original console font size.
- Returns:
true if any suitable font was successfully applied
-
-
-
-