Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-04-06 14:19:06
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Character problem with zem_contact_reborn
I´m having some problems with the zem_contact_reborn plugin and the characters åäö (mainly if used in labels)
Here is a code-exempel:
<code><txp:zem_contact_radio name=“forstahandsval” label=“Blockflöjt” /></code><br />
When the mail reaches the reciever the label still displays "Blockflöjt"
instead of “Blockflöjt”. If I use the “ö” character in the label-tag the form looks very wierd in MSIE (all messed up).
Does anyone know how to fix this?
Thanks!
Last edited by joel (2006-04-06 14:20:41)
Offline
Re: Character problem with zem_contact_reborn
Could a nice moderator please place this in the correct thread.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2006-04-06 19:38:35
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Character problem with zem_contact_reborn
I would think that you would need to be using the proper Unicode character, rather than an HTML entity reference; mail clients generally won’t render HTML entity references unless the entire message is in HTML. Could you please clarify what is meant by “the form looks very wierd in MSIE (all messed up)”? A screenshot would be great, if at all possible.
-Kurt
kurt@kurtraschke.com
Offline
#4 2006-04-06 20:25:06
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Character problem with zem_contact_reborn
It should work well, if you set your mail client to render and accept in UTF-8(At least in Thunderbird,unfortunatelly it notoriously falls back to ISO-8859-1,may be better in future releases).
If you see something like this: <pre>ηθελα να ξεÏω</pre> , it could mean, that it comes through well, but it just doesn’t render in UTF-8.
regards, marios
Last edited by marios (2006-04-06 20:25:48)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#5 2006-04-06 20:30:54
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: Character problem with zem_contact_reborn
Thanks for all the tips so far.
What I really want to know is if its possible to use “åäö-charachters” in a label of a <txp:zem_contact_text label="åäö" />
. I tried it on some radio-buttons, but the value of these were never included in the mail.
Offline
#6 2006-04-06 20:44:01
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Character problem with zem_contact_reborn
Yes, you can, the same applies to the labels as well.
NOTE.:I’ve not tested it on the radio buttons yet, but it should work
regards
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#7 2006-04-06 20:54:53
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: Character problem with zem_contact_reborn
Oh, I see!
WHen I used this code, no value showed up in the message.
<txp:zem_contact_radio name="forstahandsval" label="Tvärflåt" />, från 10 år<br />
Does anyone know if this relates to radio-buttons as well?
Offline
#8 2006-04-06 22:44:41
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Character problem with zem_contact_reborn
joel wrote:
Oh, I see!
WHen I used this code, no value showed up in the message.
Does anyone know if this relates to radio-buttons as well?
It seems, that it doesn’t work on the radio buttons, you’re right.Thanks for finding this.
The radio buttons function was the last one that was added to the plugin code AFAIK, you should post that in the relavant plugin forum, to get some response there,
regards
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: Character problem with zem_contact_reborn
joel wrote:
Oh, I see!
WHen I used this code, no value showed up in the message.
<txp:zem_contact_radio name="forstahandsval" label="Tvärflåt" />, från 10 år<br />
Have you had a look at the generated html code? As far as I know, the value for the label in those txp
tags is used for: the for
attribute in the html label
tag, is used for the id
and name
in the html input
tag and is used for form validation.
If you make that field required, I guess the form will report an error.
Lastly, it is invalid html. name
and id
(and other attributes) can only take asci characters. See this in the HTML 4.01 specs, see also this that extends/clarifies the above. The same applies to xhtml of course.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#10 2006-04-07 05:19:58
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: Character problem with zem_contact_reborn
Thanks!
I will post this in the plugin-thread
Offline
#11 2006-04-07 08:20:46
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Character problem with zem_contact_reborn
phiw13 wrote:
joel wrote:
Oh, I see!
WHen I used this code, no value showed up in the message.
<txp:zem_contact_radio name="forstahandsval" label="Tvärflåt" />, från 10 år<br />
p. Have you had a look at the generated html code? As far as I know, the value for the label in thosetxp
tags is used for: thefor
attribute in the htmllabel
tag, is used for theid
andname
in the htmlinput
tag and is used for form validation.
p. If you make that field required, I guess the form will report an error.
p. Lastly, it is invalid html.name
andid
(and other attributes) can only take asci characters. See this in the HTML 4.01 specs, see also this that extends/clarifies the above. The same applies to xhtml of course.
@phiw13, thanks for pointing this out, however, non ASCII charracters if used at all as attribute values should be escaped as HTML entities (and the validator will not complain)
@joel to circumvent this try to ommit the output of the label tag and insert a paragraph or header above your radio form tag.
In my understanding as far as it concerns I18N the xml:lang and lang attr is an alloweded attribute for the label tag.
As far as it concerns the validator, I thought that it was more a limitation of the validator, and not a validation issue, which means, that this problems more is dealing with parsing errors for non ASCII charracters,but is it really invalid XHTML ?
However it is important not to forget the charset encoding, and the language information in your header element.
See allso this document when using bilingual content,
(which I think should be avoided when using forms)
EDIT.:One last test shows, that the radio function does not pass the values to the e-mail body, if you use html entities.
regards, marios
Last edited by marios (2006-04-07 08:38:42)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline