PDA

View Full Version : String with special Characters



NewsArchive
05-29-2009, 01:38 AM
Hi,

I have to call a DLL with a string containing special characters. It is
not a fixed string but I have to build the string at runtime.

I need the following charakters (Hex-Value)

E4
F6
FC
DF
D6
C4
DC

I can put E4, F6, FC and D6 in a String by typing ALT+228 (for E4) in
the IDE. But this is not possible for DF, C4 and DC. The IDE shows a
sign that is not that one i wnat. And if I type ALT-220 for example in
the windows notepad and try to copy and paste, SB does not accept the
charachter.

What else can I do?

Thanks in advance.

Markus

NewsArchive
05-29-2009, 01:39 AM
Hi Markus,

> I have to call a DLL with a string containing special characters. It is
> not a fixed string but I have to build the string at runtime.
>
> I need the following charakters (Hex-Value)
>
> E4
> F6
> FC
> DF
> D6
> C4
> DC
>
> I can put E4, F6, FC and D6 in a String by typing ALT+228 (for E4) in
> the IDE. But this is not possible for DF, C4 and DC. The IDE shows a
> sign that is not that one i wnat. And if I type ALT-220 for example in
> the windows notepad and try to copy and paste, SB does not accept the
> charachter.
>
> What else can I do?

On our machines, it seems to accept your "special characters". See attached
screenshots and demo .sb6 project.

The project creates a file - the file holds the values E4 F6 FC DF D6 C4 DC
(the last two characters are the file terminators).

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-29-2009, 01:39 AM
Hi Friedrich,

thanks for your reply. But try this:

open notepad and type
ALT+228
ALT+246
ALT+223
ALT+196
ALT+214
ALT+220

On my windows (german XP 32) these are *not* the german umlautes.

The characters will be differently interpreted by notepad and by SB.

Markus

NewsArchive
05-29-2009, 01:40 AM
I forgot:

There is a huge difference, if you type ALT+228 or ALT+0228

Markus

NewsArchive
05-29-2009, 01:40 AM
>
> There is a huge difference, if you type ALT+228 or ALT+0228
>

The difference is that if you type 0 and the decimal Unicode value, then you
are doing it "input-language specific". You have to enter ALT+0228 to
create a hex E4 (228 decimal) value. To do it without typing a 0 (you are
doing it "code page specific"), then you have to enter ALT+132 to create a
hex E4 (228 decimal) value.

Notice that 228 is the code position for "ä" (letter a with dieresis) in
Unicode.

Hope this helps.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-29-2009, 01:41 AM
Hi Friedrich,

im sorry, but this doesn't help. But I don't know how to explain my
problem. So i try to explain in german:

Wenn ich in notepad ALT+228 eingebe, so erscheint ein o mit einer Welle
(õ) obendrauf. Dieses Zeichen wird von der DLL dann als a-Umlaut (ä)
erkannt. Wenn ich nun möchte, dass die DLL ein scharfes S (ß) erkennt,
dann muss ich in notepad ALT+223 eingeben. Wenn ich in SB ALT+223
eingebe und auf OK klicke und den Befehl wieder öffne, dann steht dort
das Zeichen, das eigentlich unter ALT+238 zu finden ist und dieses wird
auch an die DLL weitergereicht.

Kurzum: Die Eingabe von ALT+228 funktioniert, die Eingabe von ALT+223
nicht. Ich hoffe jetzt alle Missverständnisse ausgeräumt zu haben. Und
nochmal Danke für die Hilfe.

Markus

NewsArchive
05-29-2009, 01:43 AM
Hi Markus,

> im sorry, but this doesn't help. But I don't know how to explain my
> problem. So i try to explain in german:

Unfortunately, I don't have a solution for you. The IDE uses standard
Windows controls. I fear there is nothing we can do :-(

Perhaps your DLL is "incorrect"? See attached modified script. The
installer calls into a DLL -- the DLL displays the received values (in
decimal). Looks okay to me.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-29-2009, 01:44 AM
Or use this DLL and compile it into the demo .sb6 and it will display the
returned HEX value ;-)

Friedrich

NewsArchive
05-30-2009, 01:32 AM
Thank you Friedrich,

your DLL shows me, that I have something missunderstood about
codepage-conversions. My Problem was, that there is no match for ALT+223
(DOS-Codepage 850) in the Windows-1250-Codepage.

Thank you very much for your support.

Markus