Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

HELP PLS: String Problem

3 replies to this topic


  • Members
  • 9 posts

Posted 06 April 2004 - 04:08

We have an encryption component that generates strings which might contain '†' character in between. A string that has this "†" character, is not getting displayed as it is when using MessageBox. When i try to add the string to registry, it is replaced by space. When i try to see the decimal value of the character that contains "†" it return 8224 which is an impossible ASC character.

szRegVal = "adsf†adsf";
SprintfBox(MB_OK, @TITLE_MAIN, "String: %s, Chr: %c, Dec: %d, Hex: %lx", szRegVal, szRegVal[4], szRegVal[4], szRegVal[4]);

Displays the following content in messagebox
Your Application Name
String: adsf†adsf, Chr: , Dec: 8224, Hex: 2020

Because of this reason, we have to restrict users not to use some set of characters.

Pls help me solve this issue. Thanks in advance.

Edited by shyam, 06 April 2004 - 18:37.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 06 April 2004 - 20:27

I spoke with Shyam about this. He's using InstallShield 6.2 and is experiencing the problem on Windows 2000.

He also stated that both C++ and VB don't have a problem with this character conversion, but that InstallShield does. I therefore suggested that he use a wrapper DLL for this functionality.

Edited by Taco Bell, 06 April 2004 - 20:28.

user posted image

Stefan Krueger

Stefan Krueger


  • Administrators
  • 13,269 posts

Posted 10 April 2004 - 17:10

I'm not sure but "†" doen't look like a standard ASCII character. Therefore InstallShield may represent it as Unicode, and thus 8224 my be a valid code.
Why it is replaced by a blank when writing it to the registry I don't know.


  • Members
  • 9 posts

Posted 13 April 2004 - 00:38

Taco!!!! We have already written a ATL component to do the work. But that was a small (negligible) overhead. Wanted to avoid it. Anyway!!! thanks a lot for taking time to respond to me personally and through the forum.

Stefen!!! Yea it is weird. When i added the same binary stream to registry through VB or C++, i see different set of characters in registry.

NOTE: This only happens while trying to treat the stream as BINARY. As a STRING, it shows pretty well.

Thanks to you too.

Edited by shyam, 13 April 2004 - 00:39.