miscord-dev / palog

someone joined/left logs for Pal World
MIT License
20 stars 1 forks source link

Packet capture #10

Closed tsuzu closed 9 months ago

tsuzu commented 9 months ago
05 → A
6d → [
80 → "
84 → !
85 → a
89 → b
8d → c
f9 → ~
c0 → 0
c4 → 4

With Japanese

04 01 A
84 01 a
c1 04 → ぁ
c1 08 → あ
c1 10 → い
bc 5d 漢
6d 01 字

ぁ might 04 c1

encoding rule might be floor(x / 64) + (x - floor(x / 64) * 64) * 4 It follows ascii-code, but not obvious for Japanese

tsuzu commented 9 months ago

x = 97 max = 256 factor = max // 4 hex((x // factor) + (x - (x // factor) factor) 4)

tsuzu commented 9 months ago

x = 0x3042
max = 65536 factor = max // 4 >>> hex((x // factor) + (x - (x // factor) factor) 4) '0xc108'

OK It's Unicode