View Issue Details

Category
SSPBT:本体(SSP)
SeveritytrivialReproducibilityalways 
Status closed 
Summary0000073: a little question of sakura script
Description

it's me again.
when i
SakuraScriptArgConverter{/some thing/}
OnTextDrop{
//.....
'\q[◇Copy to pasteboard,OnCopy,'+SakuraScriptArgConverter(reference0)+']\n'
//.....
}
i found that i can't Drop the string "\," or "]" with no bug
if SakuraScriptArgConverter convert them to ''\," or "\]",they will end the \q zone before i want
or if convert them to ''\\," or "\]",they will be copy as ''\," or "\]"
is this a bug?
if not,how can i write SakuraScriptArgConverter?

Activities

guest

2020-04-08 12:33

reporter   ~0000147

I didn't know the forum website would convert backslashes
The text is as follows
it's me again.
when i
SakuraScriptArgConverter{/*some thing*/}
OnTextDrop{
//.....
'\q[◇Copy to pasteboard,OnCopy,'+SakuraScriptArgConverter(reference0)+']\n'
//.....
}
i found that i can't Drop the string "\," or "\]" with no bug
if SakuraScriptArgConverter convert them to ''\\," or "\\]",they will end the \q zone before i want
or if convert them to ''\\\," or "\\\]",they will be copy as ''\\," or "\\]"
is this a bug?
if not,how can i write SakuraScriptArgConverter?

guest

2020-04-08 12:41

reporter   ~0000148

and also,how can i add the CR or LF in sakura script arg?

ponapalt

2020-04-09 11:45

administrator   ~0000149

Please try this:

SakuraScriptArgConverter
{
_txt = '"'
_txt += REPLACE(_argv[0],'"','""')
_txt += '"'

_txt
}

Sakura script can't handle CR or LF entirely.
If you forcibly implement it in any way, you will face various problems such as broken SHIORI protocol.

guest

2020-04-09 17:03

reporter   ~0000150

thanks for help me that i can finsh copy function!
i even didn't think of the solution you said,orz
also, it seems that we can use CR and LF in sakura script arg. at present, a haven't found any problems except that CR and LF all be converted to CHR (1), which will cause the endline of windows text to be converted to two connected CHR (1), i didn't find anything unexpected
thank you for solving my stupid problem
XD

ponapalt

2020-04-15 10:14

administrator   ~0000151

SSP converts from CR,LF to CHR(1) internally, for safety reason to prevent protocol disruption.
It's outside-specification behavior and unexpected events may occur inside other than SSP.

Issue History

Date Modified Username Field Change
2020-04-08 12:30 guest New Issue
2020-04-08 12:33 guest Note Added: 0000147
2020-04-08 12:41 guest Note Added: 0000148
2020-04-09 11:45 ponapalt Note Added: 0000149
2020-04-09 11:45 ponapalt Assigned To => ponapalt
2020-04-09 11:45 ponapalt Status new => assigned
2020-04-09 17:03 guest Note Added: 0000150
2020-04-15 10:14 ponapalt Status assigned => closed
2020-04-15 10:14 ponapalt Resolution open => fixed
2020-04-15 10:14 ponapalt Note Added: 0000151