close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Foreign characters encoding in Powerstore 3

Thread began 6/10/2010 6:07 am by davas56386677 | Last modified 6/11/2010 5:09 pm by davas56386677 | 1079 views | 3 replies

davas56386677

Foreign characters encoding in Powerstore 3

Hi,
Using utf-8 character encoding in the pages and utf8_unicode_ci on the SQL Server side, storing foreign language special characters in the database results in a multiple character string (e.g.: “é” results in “é“).
In POWERSTORE 3 code (e.g.: /Admin/Products_Results.php) the substr() function is used (in this case associated with the PHP strip_tags() function, like shown below:
<td><?php echo substr(strip_tags($row_WADAProducts['ProductShortDesc']), 0 , 23); ?>
<?php if (strlen($row_WADAProducts['ProductShortDesc']) > 23) { echo "..."; } ?></td>
If the “WADAProducts['ProductShortDesc']” contain an “é” and this special character is on position 23 of the string, the the substr() function strips the © of the é (which is how the “é” is stored in the database) and the result displayed in the browser is nothing else but a “nice and confusing” &#65533;.
Does anybody have an idea how to solve that problem while retaining charset=utf-8 on the page level and utf8_unicode_ci for the database, the tables and the varchar fields.
One solution would be the use of charset=ISO-8859-1 on the page level but this is not what I want, since I need a broader character compatibility (mixing several foreign languages) and utf-8 appears to be just right !!!
Many thanks in advance
Dan

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...