Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Display two colors in a single chinese character
Display two colors in a single chinese character
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
3
Posted by
| LZN
(12 posts) Bio
|
Date
| Tue 20 Sep 2016 07:25 AM (UTC) |
Message
| Hi all,
I meet a text-color issue while playing Chinese MUD.
There are few Chinese MUDs that would show a single chinese character with two colors , let me explain it by using images:
http://i.imgur.com/USYuxws.png
http://i.imgur.com/O37kYxB.png
First pic shows that characters are incorrectly from MUSHClient,
(white and grey colors are fine, but characters are garbled)
the second pic shows correctly from other.
Is this could be supported by current or future version?
NOTE: while copy and paste, that Chinese characters are displayed normally(without color, just plain text) | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #1 on Tue 20 Sep 2016 08:50 AM (UTC) Amended on Sat 21 Jan 2017 09:23 PM (UTC) by Fiendish
|
Message
| Interesting!
Quote: Is this could be supported by current or future version?
I think it is not supported by the current version. I don't know how hard it would be to add support for something like this to the MUSHclient code (https://github.com/nickgammon/mushclient).
Which software shows these two color characters correctly? http://i.imgur.com/O37kYxB.png
(Anyone watching this thread: I'm launching MUSHclient in WINE with "LANG=zh_CN.UTF-8 wine MUSHclient.exe" and I'm tossing this into the input bar for testing:)
\\local ch_string1 = "你往\n"; ch_string2 = string.sub(ch_string1, 1, 1)..ANSI(1,35)..string.sub(ch_string1, 2); Simulate(ANSI(0)..ch_string1..ch_string2)
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| LZN
(12 posts) Bio
|
Date
| Reply #2 on Tue 20 Sep 2016 09:06 AM (UTC) |
Message
|
Fiendish said:
Interesting!
Which software shows these two color characters correctly? http://i.imgur.com/O37kYxB.png
I was using a telnet plugin called PttChrome on Chrome to get this picture
https://iamchucky.github.io/PttChrome/
There are some telnet client can also show two-color characters, for example:
http://pcman.ptt.cc/
http://zhouer.org/ZTerm/ | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #3 on Tue 20 Sep 2016 10:10 AM (UTC) |
Message
| Code note: I'm looking at the ZTerm code now. According to the comments, it looks like it draws each Chinese character twice, masking the first and then second half.
Quote:
// 利用 clip 的功能,只畫出部份(半個)中文字。
// XXX: 每個中文都會畫兩次,又有 clip 的 overhead, 效率應該會受到蠻大的影響!
https://github.com/zhouer/ZTerm/blob/master/org/zhouer/vt/VT100.java#L2143 |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #4 on Tue 20 Sep 2016 10:21 AM (UTC) Amended on Tue 20 Sep 2016 10:23 AM (UTC) by Fiendish
|
Message
| Code note: Looks like pcman does the same for two byte characters.
(javascript version)
https://github.com/pcman-bbs/pcman.js/blob/master/lib/termview.js#L270
(windows version)
https://github.com/pcman-bbs/pcman-windows/blob/d60faad1a6db7f77ebedc1ba406a7c0061c1b6ba/Lite/TermView.cpp#L2217 |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| LZN
(12 posts) Bio
|
Date
| Reply #5 on Tue 20 Sep 2016 10:34 AM (UTC) |
Message
|
Fiendish said:
Code note: I'm looking at the ZTerm code now. According to the comments, it looks like it draws each Chinese character twice, masking the first and then second half.
Quote:
// 利用 clip 的功能,只畫出部份(半個)中文字。
// XXX: 每個中文都會畫兩次,又有 clip 的 overhead, 效率應該會受到蠻大的影響!
https://github.com/zhouer/ZTerm/blob/master/org/zhouer/vt/VT100.java#L2143
Yes, that is what comment says.
Looks like you are familiar with Chinese, that's great! :) | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #6 on Tue 20 Sep 2016 11:02 PM (UTC) Amended on Tue 20 Sep 2016 11:03 PM (UTC) by Nick Gammon
|
Message
|
Fiendish said:
(Anyone watching this thread: I'm tossing this into the input bar for testing:)
\\\local ch_string1 = "你往\n"; ch_string2 = string.sub(ch_string1, 1, 1)..ANSI(1,35)..string.sub(ch_string1, 2); Simulate(ANSI(0)..ch_string1..ch_string2)
I can't reproduce the Chinese characters at all. I just get question marks. Are you using UTF-8 in the output window? How are you getting it to display correctly? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #7 on Wed 21 Sep 2016 07:20 PM (UTC) |
Message
| With the given launch line I have MUSHclient's UTF8 option disabled. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #8 on Thu 22 Sep 2016 04:36 AM (UTC) |
Message
| @LZN: please give me the address of a Chinese MUD for me to test my enhancements on. Preferably one that display Chinese characters without me having to log on (because I don't read Chinese, nor do I speak it). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| LZN
(12 posts) Bio
|
Date
| Reply #9 on Thu 22 Sep 2016 05:31 AM (UTC) |
Message
|
Nick Gammon said:
@LZN: please give me the address of a Chinese MUD for me to test my enhancements on. Preferably one that display Chinese characters without me having to log on (because I don't read Chinese, nor do I speak it).
Hi Nick,
ip: void7777.no-ip.org
port: 7777
I will create a test character for u to log in,
name : doubleword
passwd: testdoubleword
請輸入你在本遊戲中所使用的名字 ID NAME? <!-- type 'doubleword' here !>
請輸入密碼: <!-- type 'testdoubleword' here !>
and then press enter to skip some information.
after login, type 'look' (or 'l') to look room description,
the room title contains 3 Chinese characters followed by '(A)',that is '聊天室(A)',
each Chinese character using two color to display it. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #10 on Thu 22 Sep 2016 05:44 AM (UTC) Amended on Thu 22 Sep 2016 05:46 AM (UTC) by Nick Gammon
|
Message
| I've been trying to convert GB2312 code page to UTF-8. I'm not at all sure it is working. Check out these images:
Typing "help":

Typing "look":

Is this better or worse than what you are seeing?
Does it make any sense at all? Is it partly right or completely wrong? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #11 on Thu 22 Sep 2016 06:08 AM (UTC) |
Message
| I've been trying with telnet (on Ubuntu) and am experimenting with different encodings.
This is Chinese Traditional (Big5):
Quote:
<312hp 69m 175mv 413pw> l
�(A)
這是聊天室A棟,傳統的中國建築,檀香味瀰漫著整個空氣中,傳統的茶具
更是讓人想坐下來好好的品茗一番,來到這你可以暢所欲言,人家說:『
人若得一知己,可真死而無憾』,搞不好在這可以交到知心好友也不一定
呢!
[出口: 西]
過期的雜誌/magazine
美工刀/knife
(嗡嗡作響) 一把能夠自由進出格鬥天堂的i怳鑰。/Key
Do you happen to know what encoding (code set) you are using? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| LZN
(12 posts) Bio
|
Date
| Reply #12 on Thu 22 Sep 2016 06:12 AM (UTC) |
Message
| Hi Nick,
These characters on screenshot is completely wrong/garbled.
I think this MUD is using Big5(Traditional Chinese) charset, not GB2312(Simplified Chinese).
It should look like:
http://i.imgur.com/C2vAxfH.png
http://i.imgur.com/cTj2edn.png | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #13 on Thu 22 Sep 2016 09:23 PM (UTC) |
Message
| I suspect that what is happening with the "two colour" characters is that the colour codes are getting inbetween the two bytes of the Big5 codes, thus confusing the output routine to think that they are two different characters in two colours. This seems to support what you are describing.
It won't be easy to fix as it would require detecting this situation in the first place, and drawing each character twice, carefully masking out the left half and then the right half.
Can't you turn off this dual-character colouring at the MUD end? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #14 on Thu 22 Sep 2016 09:29 PM (UTC) |
Message
|
Quote: it would require detecting this situation in the first place, and drawing each character twice, carefully masking out the left half and then the right half.
This appears to be exactly what the Chinese-specific clients are doing. I'm guessing it must be pretty common on the Chinese servers. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
76,133 views.
This is page 1, subject is 3 pages long: 1 2
3
It is now over 60 days since the last post. This thread is closed.
Refresh page
top