Advertisement

encoding issue

Need help with the Administration of your Joomla! 5.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
User avatar
DV-admin
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 170
Joined: Wed Sep 20, 2017 7:24 am
Location: Genova
Contact:

encoding issue

Post by DV-admin » Tue Jun 25, 2024 12:46 pm

Hi there,

Has anybody come across this problem before? I am having to decode some special characters in custom fields to make them display correctly but it shouldnt really be necessary because my database entries are all encoded properly. How can i avoid having to do this everytime I create an override? Anyone know?

Code: Select all

  <?php if (isset($this->item->jcfields[149]) && !empty(trim($this->item->jcfields[149]->value))) : ?>
                        <?php $regionLink = Route::_(ContentHelperRoute::getCategoryRoute($this->item->catid)); ?>
                        <span class="region">
                            , <a href="<?php echo $regionLink; ?>"><?php echo htmlspecialchars($this->item->jcfields[149]->value, ENT_QUOTES, 'UTF-8'); ?></a>
                        </span>
                    <?php endif; ?>
My system info
  • PHP Built On Linux dedi2762.your-server.de 5.10.0-29-amd64 #1 SMP Debian 5.10.216-1 (2024-05-03) x86_64
    Database Type mysql
    Database Version 10.5.23-MariaDB-0+deb11u1
    Database Collation utf8mb4_unicode_ci
    Database Connection Collation utf8mb4_general_ci
    Database Connection Encryption None
    Database Server Supports Connection Encryption Yes
    PHP Version 8.1.29
    Web Server Apache
    WebServer to PHP Interface cgi-fcgi
    Joomla! Version Joomla! 5.1.0 Stable [ Kudumisha ] 16-April-2024 16:00 GMT
    Joomla Backward Compatibility Plugin Enabled ()
    User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Advertisement
Advertisement
Post Reply

Return to “Administration Joomla! 5.x”