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
➜ Development
➜ UTF-8 & ANSI positioning code
UTF-8 & ANSI positioning code
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #15 on Fri 15 Feb 2013 04:13 AM (UTC) |
Message
|
FallenTree said:
what it should have done, is, when output is in UTF-8 mode, and mushclient got input "<byte1><byte2>" it should encode it as UTF-8 "\Uxxxx\Uxxx\Uxxx\Uxxx" and then send it out, and draw it to screen.
What is "it" here? MUSHclient? The server? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #16 on Wed 27 Feb 2013 07:40 AM (UTC) |
Message
| sorry to reply late,didn't receive email notification on this one.
i'm referring to mushclient.
when output is utf-8 mode, mushclient should translate input textbox text to utf-8 when sending out. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #17 on Thu 28 Feb 2013 05:32 AM (UTC) |
Message
| From what, though? How is it supposed to know what encoding is in use in the input box? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #18 on Fri 01 Mar 2013 12:42 AM (UTC) |
Message
|
Nick Gammon said:
From what, though? How is it supposed to know what encoding is in use in the input box?
it is always the system locale, right? I think here's what is needed:
first, convert system-locale to utf-16
uses: MultibyteToWideChar(CP_THREAD_ACP, .... rest of the args)
then , convert utf-16 to utf-8 : WideCharToMultiByte(CP_UTF8, xxxxxxxx)
the result string is the UTF-8 version of the input string.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd319072(v=vs.85).aspx | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #20 on Wed 13 Mar 2013 07:45 AM (UTC) |
Message
| It's difficult for me to test but I'll see what I can do. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #21 on Sat 16 Mar 2013 05:03 AM (UTC) |
Message
| I can test this whenever you have a new build.
Thanks. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #22 on Sat 16 Mar 2013 06:31 AM (UTC) Amended on Sat 16 Mar 2013 06:32 AM (UTC) by Nick Gammon
|
Message
| Can you tell me what I am doing wrong here?
I have Chinese encoding turned on, and type "ni hao" which echoes like this:
However as soon as I hit <enter> to send it, it becomes:
And that is before it reaches my code (which I added) to convert it to UTF-8. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #23 on Sun 24 Mar 2013 04:37 AM (UTC) |
Message
| OK, I think I have it. I didn't have the code page selected. How's this?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #24 on Sun 24 Mar 2013 05:24 AM (UTC) |
Message
| Try version 4.90 of MUSHclient. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #25 on Fri 05 Jul 2013 09:25 PM (UTC) |
Message
| Hi unfortunately 4.90 doesn't work correctly for me, please see example here:
http://imgur.com/CQ15hCf
I typed '你好
but 你好 is displayed as garbled in the window. If things works correctly, i should see 你好 in the window too, I have utf-8 code enabled.
Your help is much appreciated, thanks! | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #26 on Fri 05 Jul 2013 09:27 PM (UTC) |
Message
| see in the command history window, it is also not displaying correctly:
http://imgur.com/v4wRlEX | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #27 on Sun 07 Jul 2013 07:10 AM (UTC) |
Message
| What was the objection to running without UTF-8? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #28 on Mon 08 Jul 2013 05:01 AM (UTC) |
Message
| You mean change the mud server not outputing utf-8? Well, yes, that is how the "old" way works, with many drawbacks, like all string in the source code needs to be in gb2312 (since driver sends them as-is) , etc etc.
By the way, I'm the maintainer of FluffOS (https://github.com/fluffos/fluffos) I understand it must be difficult to try to get things working in non-native language, I will try to see if i could come up with a patch myself.
In another word, thanks for open sourcing mushclient to make this possible. | Top |
|
Posted by
| FallenTree
(14 posts) Bio
|
Date
| Reply #29 on Mon 08 Jul 2013 05:31 AM (UTC) |
Message
| I just notice that you actually have a utf-8 fix in 4.91 in cooking. Let me see if problem still exists in current 4.91 after you recent fix, will report back. | 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.
86,848 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top