Asking to see if you missed anything.
Forum
News CS2D v1.0.0.6Asking to see if you missed anything.
DC has written
ADDED Korean translation, thanks to Zeisen (U.S.G.N. #53832)
wait what? yeszz!
edited 4×, last 29.05.19 11:52:08 am
Why do you need free bind?
return 1for key hook instead of free binding.
Very very bad idea.
msg('UTF-8:\x6B22\x8FCE\x6765\x5230\x4E2D\x6587\x7AD9')
--欢迎来到CS2D中文站
msg('UTF-8:\x4F60\x597D\xFF0C\x6211\x662F'..'Toby')
--你好,我是Toby
Use this:
http://unrealsoftware.de/files_show.php?file=17595
edited 4×, last 05.12.17 09:18:18 pm
edited 1×, last 29.05.19 11:52:02 am
msg("欢迎来到CS2D")
This should work as expected in CS2D 1.0.0.6.
The current version of Lua (5.3) provides the utf8 module. It provides functions for manipulating UTF-8 strings in Lua. Are there any plans for cs2d to use this version? There shouldn't be many compatibility problems with upgrading. Only one that I can think of is unpack now being table.unpack.
I've implemented that new UTF support feature so someone could write a Lua wrapper like this:
http://unrealsoftware.de/files_show.php?file=17595
It's not like that file submission fixes the flaw, it was intentional from the beginning.
BlitzMax does not support Lua 5.3 and yet it doesn't support even 5.2 as we have spent some time, but it lead to crashes and instability.
Using that upload lib I don't really see any shortcomings.
It could be included by default in CS2D.
"UTF-8:xE6xACxA2xE8xBFx8ExE6x9DxA5xE5x88xB0x43x53x32x44"instead of simply
"欢迎来到CS2D".
This doesn't require the Lua 5.3 utf8 module or any support from Lua (although it could be helpful in some cases).
The only thing needed is for CS2D to treat strings as UTF-8 and parse them. If BlitzMax doesn't have built-in UTF-8 functions they could be written, UTF-8 is simple to implement. RFC 3629
The only problem with doing that way is that scripts already saved with ASCII encoding would have invalid UTF-8 sequences for any non-ASCII characters. The biggest issue with this would be the color code symbol, ©. It would be invalid in currently existing scripts.
That problem can be solved by treating invalid UTF-8 sequences as bytes.
Assume this is part of a string that's passed to msg, print, etc.
©2as ASCII would be
A9 32
as UTF-8 would be
C2 A9 32
Some UTF-8 decoders would treat the ASCII version as invalid, possibly raising an error or returning an error code. A decoder that simply returns the byte would work for CS2D.
edited 1×, last 09.12.17 01:16:29 am
1. Even if this would be possible it would corrupt already existing scripts in ASCII.
2. I told you we already tried that.
Lua fails to pass UTF-8 into C interface. It takes 16-UTF string into lua interface.. but somewhere inside it eats it up and BlitzMax ends up in corrupted symbols.
3. With engineers script all you need to do is
1
print("欢迎来到CS2D")
edited 1×, last 09.12.17 03:46:56 am
Also the sudden increase in player numbers motivates me to write scripts here again.
DC has written
@ Mora: Please use the bug or idea thread (depending on what you're posting) to post these things. The news thread is not the right place. Thank you!
Edit:
Hotfixed the RCon issue in the windows client (Steam only, no visible patch version or anything).
Edit:
Hotfixed the RCon issue in the windows client (Steam only, no visible patch version or anything).
@ DC: The "Can't use rcon" problem is immanent in the MacOS Steam version either. Is there any way to circumvent this as an admin?