Replies: 5 comments 6 replies
-
Hi @gatokichi - I believe that you should be able to do this today, though will take a bit of customization. First you will need to save your art files in utf-8. Most of the modern ANSI art programs should be able to do this, I'm pretty sure IcyDraw can for example. Then in the menus config use the "encodedAs" option to tell it that the art file is in utf-8 (unfortunately, I don't see that it is documented though it should be, but if you are comfortable looking at code, you can see more details at: Line 89 in 6766f6e After that, change your menu config to force the connection to utf-8 using the Hopefully, that should force everything into utf-8 and fix the issues you are seeing. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@gatokichi I love that Enig is being used in a non-Romanized language! As @cognitivegears says, you could force all menus to UTF-8, and if needed, also save all art as UTF-8. Enigma will read all ANSI file as CP437 and convert to the clients encoding of UTF-8 if needed. Perhaps a small PR could set some global enforcement such as If @cognitivegears' suggestions work for you, that will give some information as to what we could do here to make things easier. |
Beta Was this translation helpful? Give feedback.
-
I am continuing to work on converting the menu screen to UTF-8.
|
Beta Was this translation helpful? Give feedback.
-
In ENiGMA½, there is no control over full-width characters (especially CJK characters) during text input. When attempting to delete a full-width character using the backspace key, only the equivalent of a half-width character is removed, causing the input text to become corrupted. This issue is present even with single-line input, but it becomes particularly critical when editing text in the screen editor used for message composition, where existing text can be irreparably damaged. To address this, I have modified core/edit_text_view.js, which controls single-line input, and core/multi_line_edit_text_view.js, which handles text input in the screen editor. These modifications work correctly when inputting CJK characters in UTF-8, but I lack the knowledge to ensure compatibility with scripts such as Arabic, so those are likely unsupported. Since ENiGMA½ is probably intended primarily for users working with alphanumeric characters, I do not believe my modifications need to be officially adopted, so I am simply sharing them here. While it might be possible to directly write character code ranges in the source to determine character width, I chose to use the wcwidth module instead. To install the wcwidth module, run: core/edit_text_view.js (full)
|
Beta Was this translation helpful? Give feedback.
-
The changes to the screen editor were extensive. I have also added features to merge lines when pressing the delete key at the end of a line and to connect to the previous line when pressing the backspace key at the beginning of a line. core/multi_line_edit_text_view.js (full)
|
Beta Was this translation helpful? Give feedback.
-
I understand that ENiGMA½ BBS prioritizes ANSI display compatibility. However, in my country's language, switching between ANSI(cp437) and UTF-8 can cause characters, especially full-width ones, to be displayed incorrectly, resulting in garbled text. Even if I re-specify the encoding in the terminal, the display may not be corrected. I believe this issue also affects Chinese characters, Japanese Kana, Korean Hangul, and other non-alphabetic scripts.
Is there a way to disable the switching between ANSI and UTF-8 and fix the encoding to UTF-8 for the entire ENiGMA½ BBS system (for all users)?
Beta Was this translation helpful? Give feedback.
All reactions