Skip to content

Commit 32ed89d

Browse files
thefallentreeclaude
andcommitted
Fix broken ANSI color codes in xingzhanyingxiong's login banner
The original archive's welcome banner colored individual GBK box-drawing glyph bytes by wrapping each byte in its own escape sequence (e.g. ESC[0;1;35m + <GBK byte> + ESC[1m + <GBK byte> + ESC[0m) -- a legacy technique some old GB2312/GBK-era MUD ANSI art relied on. This project's lossy GB18030->UTF-8 transcoding fallback (used on this file per its own NOTES.md) correctly dropped the now-orphaned, undecodable GBK bytes, but also incorrectly ate the ESC (0x1b) byte off the immediately-following escape sequence, turning valid color codes into literal garbage text like "[1m[0m" in the terminal. Verified via a raw socket connection to a live driver that the fix produces well-formed escape sequences with zero orphaned bracket- notation text remaining. The original art glyph bytes themselves are unrecoverable (they relied on undocumented legacy terminal-specific rendering of split multi-byte sequences with no clean UTF-8 equivalent) -- restoring the escape codes is the fixable, unambiguous part. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VyQCUoTo1Z93Py9aVFHQi1
1 parent 6131bad commit 32ed89d

3 files changed

Lines changed: 36 additions & 36 deletions

File tree

libs/xingzhanyingxiong/work/adm/etc/welcome

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
[1m[0m
2+

33
 . .          .
4-
[1m[0m [1m[1m[1m[1m
5-
[1m[0m .           . 
6-
[1m[1m[1m[0m [1m[1m       
7-
[1m[1m[1m[0m ▆ ▆ [1m[1m  [1m[1m
8-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[1m    
9-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█
10-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[0m
11-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │
12-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │  ▏
13-
[1m[1m[1m ████ __o_\___ │ [1m[1m[1m[0m▏
14-
[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[0m =-o----o-' ⿳ ◥▆▅▄▃▂
4+
 
5+
 .           . 
6+
        
7+
 ▆ ▆   
8+
 ██     
9+
 ██
10+
 ██ 
11+
 ██ │
12+
 ██ │  ▏
13+
 ████ __o_\___ │ ▏
14+
 =-o----o-' ⿳ ◥▆▅▄▃▂
1515
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓≈≈≈乱世风沙之星战英雄
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1717

libs/xingzhanyingxiong/work/adm/etc/welcome.tmp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
[1m[0m
2+

33
 . .          .
4-
[1m[0m [1m[1m[1m[1m
5-
[1m[0m .           . 
6-
[1m[1m[1m[0m [1m[1m       
7-
[1m[1m[1m[0m ▆ ▆ [1m[1m  [1m[1m
8-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[1m    
9-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█
10-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[0m
11-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │
12-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │  ▏
13-
[1m[1m[1m ████ __o_\___ │ [1m[1m[1m[0m▏
14-
[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[0m =-o----o-' ⿳ ◥▆▅▄▃▂
4+
 
5+
 .           . 
6+
        
7+
 ▆ ▆   
8+
 ██     
9+
 ██
10+
 ██ 
11+
 ██ │
12+
 ██ │  ▏
13+
 ████ __o_\___ │ ▏
14+
 =-o----o-' ⿳ ◥▆▅▄▃▂
1515
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓≈≈≈≈≈≈≈≈星战英雄
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1717

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
[1m[0m
2+

33
 . .          .
4-
[1m[0m [1m[1m[1m[1m
5-
[1m[0m .           . 
6-
[1m[1m[1m[0m [1m[1m       
7-
[1m[1m[1m[0m ▆ ▆ [1m[1m  [1m[1m
8-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[1m    
9-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█
10-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ [1m[0m
11-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │
12-
[1m[1m[1m[1m[1m █[1m[1m[1m[0m█ │  ▏
13-
[1m[1m[1m ████ __o_\___ │ [1m[1m[1m[0m▏
14-
[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[1m[0m =-o----o-' ⿳ ◥▆▅▄▃▂
4+
 
5+
 .           . 
6+
        
7+
 ▆ ▆   
8+
 ██     
9+
 ██
10+
 ██ 
11+
 ██ │
12+
 ██ │  ▏
13+
 ████ __o_\___ │ ▏
14+
 =-o----o-' ⿳ ◥▆▅▄▃▂
1515
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓≈≈≈≈≈≈时空通道
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1717

0 commit comments

Comments
 (0)