[SOLVED] Substitutions when special characters are used

13 years 7 months ago #141903 by palmqviststefan
Hi,

I am trying to create a public userlist on my site, and in that list I want to display some other e-mail address than the users private e-mail. As an example, on the public userlist the chairmans e-mail would be chair@mysite.com rather than firstname.lastname@mysite.com.

I have a multicheckbox (cb_boardmember) where one of the options is "Chairman", and I then create a delimiter field called cb_publicmail where I use the following substitution:

[code:1][cb:if cb_boardmember ="Chairman"]chair@mysite.com[/cb:if][/code:1]

This works like a charm and all I need to do is to display the delimiter field cb_publicmail in one of the columns of the userlist.

Now to my problem... My site is in swedish and chairman in Swedish is "Ordförande". The above code does not work when special characters are used. Is there any way to work around this? I have tried the following:

-using "%F6" instead of "ö" in the if-statement
-using LIKE "Ordf%" in the if-statement

Any help is greatly appreciated,
Stefan

Post edited by: palmqviststefan, at: 2010/09/11 09:28

Post edited by: krileon, at: 2010/09/20 15:10

Please Log in to join the conversation.

13 years 7 months ago #141906 by nant
Check your database/table collation.

verify that everything is utf-8 in your database.

Please Log in to join the conversation.

13 years 7 months ago #141913 by palmqviststefan
Replied by palmqviststefan on topic Re:Substitutions when special characters are used
OK, here is what I find.

The term "Ordförande" is being stored as exactly that in the fieldtitle of #_comprofiler_field_values. The collation is utf8_general_ci.

But the substitution I am putting into the description in #_comprofiler_fields is stored as

[code:1]Ordförande[/code:1]

The table collation is the same.

/Stefan

Post edited by: palmqviststefan, at: 2010/09/11 12:18

Please Log in to join the conversation.

13 years 7 months ago #142030 by krileon
It's being htmlspecialed, which is intended. Using the following should work just fine.

[code:1]
[cb:if cb_boardmember ="Ordförande"]chair@mysite.com[/cb:if]
[/code:1]

Instead of the following.

[code:1]
[cb:if cb_boardmember ="Chairman"]chair@mysite.com[/cb:if]
[/code:1]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 7 months ago #142424 by palmqviststefan
Replied by palmqviststefan on topic Re:Substitutions when special characters are used
Hi,

turned out that my issues were a consequence of the editor I have installed on my site, JCE-Joomla Content Editor. The editor was saving the special characters in html-format. Once I installed and activated the Swedish plugin for the editor, it saved the special characters as it should.

Krileon, that code is exactly what I as using. Sorry for not explaining better. But the editor was still saving the special character in html-encoded format.

Many thanks for your help, please consider this topic as solved.

/Stefan

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.265 seconds

Facebook Twitter LinkedIn