em dash

1 view
Skip to first unread message

renewedliving

unread,
Sep 5, 2015, 11:02:29 AM9/5/15
to eiffel_...@yahoogroups.com

In vb.net, one can include an em dash (a wide hyphen) using
Dim s as String
s = "Hello " & ChrW(&H2014) & " World"

I have tried the following, but it doesn't work. What does work?
Hex 20 = Decimal 32
Hex 14 = Decimal 20

local
s: STRING
do
create s.make(16)
s.append ("Hello %/32/%/20/ World")

but it doesn't display right on the form.

Thank you,
Brother Bill



------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/eiffel_software/

<*> To unsubscribe from this group, send an email to:
eiffel_softwa...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/




Emmanuel Stapf [ES]

unread,
Sep 5, 2015, 11:05:10 AM9/5/15
to eiffel_...@yahoogroups.com

Eiffel does not yet support natively Unicode characters in manifest strings even
on .NET. However on .NET you can manipulate the .NET string with Unicode
characters.

So you can rewrite your code as:

local
s: STRING
i: INTEGER
do
create s.make(16)
s.append ("Hello ")
i := 0x2014
s.append_character (i.ascii_char)
s.append (" World")
end

Regards,
Manu



------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/nhFolB/TM

Emmanuel Stapf [ES]

unread,
Sep 5, 2015, 11:05:30 AM9/5/15
to eiffel_...@yahoogroups.com

To be correct, you should use `to_character' instead of the obsolete `ascii_char'.

Regards,
Manu
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
Reply all
Reply to author
Forward
0 new messages