xbarns
17th December 2008 13:18 UTC
nsExec Unicode Strange Characters returned
Hi all,
one of my programmers has provided me with a little tool to encrypt a password we use.
I use NSIS Unicode 2.38 and when executing
nsExec::ExecToStack '"$PLUGINSDIR\Crypt.exe" $R0'
Pop $0
Pop $1
DetailPrint "Crypt Password: $0 - $1"
in $1 i get "H#B777973B2483E148B95B1086E9D8B3DD3C52â–¡â–¡"
where â–¡â–¡ is what irritates me because that should not be there.
Any Ideas?
Anders
17th December 2008 14:15 UTC
what are those exactly, newlines? http://www.decodeunicode.org/u+25A1 ?
does Crypt.exe output unicode?
xbarns
17th December 2008 15:24 UTC
what are those exactly, newlines? http://www.decodeunicode.org/u+25A1 ?
I think so yes, but not sure though how can i find out?
As far as i know Crypt.exe does not output unicode, i wrote an email to the programmer to find out, unfortunately he wen't home for the day already :(
xbarns
17th December 2008 15:47 UTC
OK, i saw that you can try the character in that webpage, but sadly i cannot paste it in, notepad cuts it off and puts the next character (put there on purpose) on the next line.
I have tried with UltraEdits Hex view and the Character is "0D0A" which represents a "carriage return line feed" :(
Anders
17th December 2008 17:49 UTC
its probably just the output of Crypt.exe, DetailPrint does not support newlines, can't you just strip it out with StrCpy ?
Afrow UK
17th December 2008 18:10 UTC
nsExec dumps all the output into one stack item.
If you use ExecDos::Exec /TOSTACK, it will output line by line to the stack.
Just Push /End before executing Crypt.exe and keep popping until you Pop /End.
Stu
xbarns
18th December 2008 08:24 UTC
It was the EXE itself that produced that CRLF, the guy programming it fixed it.
Thanks for your help :)