SphereServer BugTracker - SphereServer
View Issue Details
0001502SphereServerexecutable - genericpublic25-08-08 17:3522-04-14 18:26
dzhony 
Ben 
normalfeaturealways
closedno change required 
 
 
08-02-2008
New_Triggers, Size_Optimise, DamageTools, NPCAct_Triggers
Command_Sysmsgs, OSIMultiSight, NoItemNaming, NoHouseMuteSpeech, NoPrefix, DyeType
0001502: A few string-handling suggestions - dAsc, Locals and Tags, and Charset Converting
Well, where to start :)

1) dAsc <string> returns only the first char evaluated ... for example: Asc abc returns 061 062 063, but dAsc abc returns 97. I suggest using something like this, instead of original dAsc:

[Function f_asc]
Local.Remaining = "<Asc <Args>>"
Local.First = <StrArg <Local.Remaining>>
Local.Return = "x,<Eval <Local.First>>"
While !<IsEmpty <StrEat <Local.Remaining>>>
    Local.Remaining = <StrEat <Local.Remaining>>
    Local.First = <StrArg <Local.Remaining>>
    Local.Return .= " <Eval <Local.First>>"
EndWhile
Return <StrEat <Local.Return>>

2) Locals and Tags ... it seems impossible to store a space char ' ' (asc 020) in local. Sphere automatically evaluates locals, so, instead of ' ' there is '00'. I agree, it is a feature and such change would cause serious troubles on many shards running on 56b ... but, maybe it could be solved by adding something like local, but built for chars and string - maybe SLocal, or something like that :) Single space char can not be stored even in Tag, using syntax .tag.something=" " ... it is also evaluated -> "00". The only way how to store ' ' is setting the local value to "x x" and later using StrAsc to get the middle char of this string.

3) Charset converting ... As a member of Czech UO shard GM team, I have to deal with differencies between UTF and ANSI. It seems as if Sphere was incorrectly interpreting commands (using the latest client versions 6.0.x) written in UTF encoding ... Unicode speech is no problem, but running a unicode-named function, or using unicode chars (?????? etc.) in function arguments, which I'm entering directly in the client command line, seems to be a problem. Would it be possible to convert such chars correctly, with EF_UNICODE turned on?
- The same issue is the use of unicode chars in the console window, telnet console, or log file ... the same problem, incorrect conversion.
f_charsets.scp included - contains functions for converting between ANSI and UTF ... Scripted solution is possible, but built-in solution should be faster, shouldn't it? :)
No tags attached.
? f_charsets.scp (11,584) 25-08-08 17:35
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=11&type=bug
Issue History
25-08-08 17:35dzhonyNew Issue
25-08-08 17:35dzhonyFile Added: f_charsets.scp
25-08-08 17:35dzhonyNightly Version => 08-02-2008
25-08-08 17:35dzhonyExperimental Flags => New_Triggers, Size_Optimise, DamageTools, NPCAct_Triggers
25-08-08 17:35dzhonyOption Flags => Command_Sysmsgs, OSIMultiSight, NoItemNaming, NoHouseMuteSpeech, NoPrefix, DyeType
25-08-08 17:43dzhonyNote Added: 0000071
04-09-08 11:48dzhonyNote Added: 0000083
09-09-08 10:25dzhonyNote Added: 0000087
09-09-08 22:58dzhonyNote Added: 0000089
15-09-08 17:47dzhonyNote Added: 0000092
22-04-14 18:26BenNote Added: 0002077
22-04-14 18:26BenStatusnew => closed
22-04-14 18:26BenAssigned To => Ben
22-04-14 18:26BenResolutionopen => no change required

Notes
(0000071)
dzhony   
25-08-08 17:43   
It seems as if this bugtracker was unable to interpret unicode chars as well :-) The '???' section of my feature request should look like this:
http://www.andaria.net/transfer/johny/unicode_chars.bmp [^]
(0000083)
dzhony   
04-09-08 11:48   
The party speech has a minor problem ... text of the message is displayed without errors, but name of the player char, containing special chars, doesn't look good: http://www.andaria.net/transfer/johny/party_err.jpg [^]
(0000087)
dzhony   
09-09-08 10:25   
Another issue, related to this report ... It seems as if PromptConsole was filtering unicode chars ... These chars are not appearing in the Args of the consequential function, triggered after pressing Enter in the PromptConsole.
(0000089)
dzhony   
09-09-08 22:58   
One more issue :)
Unicode sysmessages do not wrap correctly - in journal, it seems OK, but in the game window, part of the message is not visible. See:
http://www.andaria.net/transfer/johny/sysmessage_err.jpg [^]
(0000092)
dzhony   
15-09-08 17:47   
Importance: lowest :)

If there is a unicode-letter-started word in the name of an item or character, the automatic capitalizing (ingame tooltips, names) doesn't work - that letter is displayed small. Don't know for sure if the capitalizing is client or server side ...

For better understanding: http://www.andaria.net/transfer/johny/capitalizing_err.png [^]
(0002077)
Ben   
22-04-14 18:26   
for 0000001 D<variable> was designed to replace <eval >... any special instances of evaluation (like ASC) should be done with scripts.

0000002 LOCALs and TAGs seems to be able to store only a space. Not sure when this was rectified, but it works.

0000003 would be best to reopen another ticket if this is still an issue