Before Hollywood 7, I would use this to get an em dash:
EmDash$=Chr($e2)..Chr($80)..Chr($94)
With Hollywood 7, that doesn't work any more. So what's the best way to accomplish this now?
This doesn't work either:
EmDash$=ConvertStr(Chr($e2)..Chr($80)..Chr($94), #ENCODING_ISO8859_1, #ENCODING_UTF8)
Help with Special Characters
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Help with Special Characters
You need to think in Unicode now. It's no longer necessary to construct UTF-8 sequences manually. So you could either just save your script as UTF-8 and just use the em dash in your code like this:
or if you want to construct it manually, just use its Unicode codepoint which is $2014 (8212 in decimal notation), like so:
Much easier than with older Hollywood versions...
Code: Select all
EmDash$ = "—"
Code: Select all
EmDash$ = Chr($2014)
Re: Help with Special Characters
Thanks!
(I have to construct it manually with Chr() because CodeBench doesn't support Unicode characters.)
(I have to construct it manually with Chr() because CodeBench doesn't support Unicode characters.)
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Help with Special Characters
Ok. Might be a good idea to file a feature request with the CodeBench authors so that they add UTF-8 support. I'm not even sure if there's a text editor on OS4 which supports UTF-8 at all. MorphOS has Scribble which supports it but on OS4 I don't know if there is any UTF-8 editor...PEB wrote:(I have to construct it manually with Chr() because CodeBench doesn't support Unicode characters.)