Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 15 total
Thread Unusual characters
Wed, May 8 2013 9:36 AMPermanent Link

Matthew Jones

I put a "TM" character in a panel title, and the Application name, and it comes out
as an "a,,C" style string. The actual characters are accented, but I don't want to
put them here in case it breaks the message. I put the TM in using the Alt-0153
keyboard method. If I put in ™ it is escaped to appear properly.

Is there a way to use these characters?

/Matthew Jones/
Wed, May 8 2013 4:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I put a "TM" character in a panel title, and the Application name, and it
comes out as an "a,,C" style string. The actual characters are accented, but
I don't want to put them here in case it beaks the message. I put the TM in
using the Alt-0153 keyboard method. If I put in &trade; it is escaped to
appear properly.

Is there a way to use these characters? >>

Not currently, no - the form/panel titles are straight-up text, not HTML, in
order to avoid display issues at design-time.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 9 2013 4:24 AMPermanent Link

Matthew Jones

> Not currently, no - the form/panel titles are straight-up text, not
> HTML, in order to avoid display issues at design-time.

I can understand that, but these are ordinary characters. It would be good to
support the basic ones at some point - they "only" need to be converted in the
compiler output. Trademarks, copyright, that sort of thing.

/Matthew Jones/
Thu, May 9 2013 11:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

I got a chance to try this here, and it works fine here when I use:

Elevate Software

as a panel title, application title, etc.

I tested it in IE and FF.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 9 2013 1:13 PMPermanent Link

Matthew Jones

Okay, I take it that is the single character TM (which appears in the web version
of your message, not on my old newsreader version). IE10 seems to have decided to
not work on my PC, but I will try on a VM. Seems odd though that it would be
different for me. How did you get your character in? (The character displays in the
IDE just fine, just not in Chrome).

Checking the javascript, my Alt-0153 character is output in the .js as hex
characters E2, 84, A2. This in a TPanel caption.

A quick wikipedia tells me that E2 is a symbol prefix in UTF-8.
the web page at
http://www.anchor.com.au/hosting/Character-sets-and-content-encoding-hell
shows that this is indeed a trademark.

Seems it is Chrome that isn't interpreting the UTF8 correctly, or perhaps doesn't
know it is UTF8.

But this is something I can use my auto-patcher for, so it doesn't concern me so
much now. I can just swap those 3 bytes for &trademark; or whatever.

/Matthew Jones/
Thu, May 9 2013 1:29 PMPermanent Link

Matthew Jones

Okay, I need more info. If I replace the UTF8 in the script with the &trade; it
just shows as the literal text. Okay, so Chrome is perhaps being daft, so I tried
&lt; but that too is literally shown. Yet this is in the HTML when I inspect the
element, not some variation where it has been escaped. How can this be?

/Matthew Jones/
Thu, May 9 2013 1:35 PMPermanent Link

Matthew Jones

> Okay, I need more info. If I replace the UTF8 in the script with
> the it
> just shows as the literal text. Okay, so Chrome is perhaps being
> daft, so I tried
> < but that too is literally shown. Yet this is in the HTML when I
> inspect the
> element, not some variation where it has been escaped. How can this
> be?

Chrome speak with forked tongue. Looking at the properties, it shows:
innerText: "Test&lt;"
innerHTML: "Test&amp;lt;"

I presume that this is being added somewhere in the code? Is there a way to bypass
this? I ended up at webdom_setelementtext and didn't see anything doing fancy
things with ampersands.

/Matthew Jones/
Thu, May 9 2013 1:48 PMPermanent Link

Matthew Jones

And chasing that on down, webdom_setelementtext seems to use innerText which is
defined as being safe, thus not allowing my coding. Changing it to use innerHTML
"works", but seems to be an unsafe thing generally, and I'd not want to change that
anyway other than for a hack test.

It's not an easy one, so unfortunately shelve it until 1.02 or later. It would be
nice to support somehow though.

/Matthew Jones/
Thu, May 9 2013 2:17 PMPermanent Link

Matthew Jones

> I tested it in IE and FF.

I've just tried IE 10 (which apparently was hanging due to an AVG safe search
add-in), and it too shows the funny characters. As does my iPhone! My XP VM doesn't
seem to be able to access my dev PC.

I've just checked the character in the HTML of your message, and it seems to be
character 99h. If I try to copy and paste, it ends up as the UTF8 again in the
script.

/Matthew Jones/
Thu, May 9 2013 2:25 PMPermanent Link

Matthew Jones

In the WBF file, the caption is being stored as this:

Caption = 'Test'#8482

That appears to be the unicode character. If I change that to the #99 character, I
get a 'c' all the way through. Editing it as hex to put in a 99h byte shows an
A(grave) then the TM. This is probably because the WBF is in unicode.

I don't think I understand what is happening, and I need to go home now. Thanks for
listening. 8-)

/Matthew Jones/
Page 1 of 2Next Page
Jump to Page:  1 2
Image