Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    International character support

    Scheduled Pinned Locked Moved Operating
    7 Posts 4 Posters 2.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tolik25251
      last edited by

      Hello!
      Can i-doit be configurated to support russian (or other national) alphabet symbols natively?
      Because i ran into some problems when generating reports.
      When populating Infrastructure tree object names displayed normally but when i press "print preview" they are displayed in &# notation

      I tried edit source code and change encoding from iso-8859-15 and latin1 to UTF-8 but without success.

      Thank you in advance!
      РЎРЅРёРјРѕРє.png

      1 Reply Last reply Reply Quote 0
      • T Offline
        tolik25251
        last edited by

        Fixed it myself:
        deleted utf8_encode, utf8_decode in ajax calls  😄

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dainis
          last edited by

          Tolik25251 or someone, are you can explain more in details how to change encoding to UTF-8.
          I have changed:

          1. All ISO-8859-15 charsets in Theme files to UTF-8 and also "de" to my national
          2. Encoding parameter in config.inc.php to UTF-8
          3. And line 128 in functions.inc.php to "function isys_glob_prepare_ajax_request($p_charset="utf-8") {"
            … but still have problems with national characters. When populating tree object or data in display-form names displayed normally, but when I press edit, they are displayed incorrectly.

          Thank you in advance,
          Dainis

          ok.jpg
          nok.jpg

          1 Reply Last reply Reply Quote 0
          • SBohmS Offline
            SBohm
            last edited by

            Try this:
            ISO-8859-5
            ISO-8859-5_encode, ISO-8859-5_decode

            OR SET apache directly to this charset.

            Linux Path: etc/apache(2)/Conf.d/charset
            Windows Path: $installPathApache(2)/conf/charset.conv
            And change:
            AddDefaultCharset UTF-8
            in
            AddDefaultCharset ISO-8859-5

            and remove # before the Add…
            1. Save
            2. restart apache

            ! On Windows you must Add the Line AddDefault..... !

            1 Reply Last reply Reply Quote 0
            • dsD Offline
              ds
              last edited by

              What is your apache's default charset Dainis?

              1 Reply Last reply Reply Quote 0
              • T Offline
                tolik25251
                last edited by

                Dainis, for me, it was most difficult thing to solve 😄
                try this patch
                or edit files manually (don't forget to make a backup)

                
                From 8916e7587e85991dfcf639f0b3bda643d3e6ed01 Mon Sep 17 00:00:00 2001
                From: root <root@02-cmdb01.(none)>Date: Fri, 22 Oct 2010 16:14:20 +0700
                Subject: [PATCH 7/7] fixed garbage in edit and listbox
                
                ---
                 .../smarty/isys_smarty_plugin_f_dialog.class.php   |    2 +-
                 .../smarty/isys_smarty_plugin_f_text.class.php     |    2 +-
                 2 files changed, 2 insertions(+), 2 deletions(-)
                
                diff --git a/src/classes/smarty/isys_smarty_plugin_f_dialog.class.php b/src/classes/smarty/isys_smarty_plugin_f_dialog.class.php
                index f001693..d5d94bb 100644
                --- a/src/classes/smarty/isys_smarty_plugin_f_dialog.class.php
                +++ b/src/classes/smarty/isys_smarty_plugin_f_dialog.class.php
                @@ -310,7 +310,7 @@ implements isys_smarty_plugin
                
                                                if (isset($l_excludes[$l_key])) continue;
                
                -                               $l_encoded_value = $g_comp_template_language_manager->get(htmlentities($l_value));
                +                               $l_encoded_value = $g_comp_template_language_manager->get(html_entity_decode($l_value));
                
                                                $l_strSelected =
                                                        (($p_param["p_strSelectedID"] == $l_key)) ?
                diff --git a/src/classes/smarty/isys_smarty_plugin_f_text.class.php b/src/classes/smarty/isys_smarty_plugin_f_text.class.php
                index f85c2f6..91f424b 100644
                --- a/src/classes/smarty/isys_smarty_plugin_f_text.class.php
                +++ b/src/classes/smarty/isys_smarty_plugin_f_text.class.php
                @@ -124,7 +124,7 @@ implements isys_smarty_plugin
                                }
                
                                $p_param["p_strValue"] = stripslashes($p_param["p_strValue"]);
                -               $p_param["p_strValue"] = htmlentities(isys_glob_unescape($p_param["p_strValue"]));
                +               $p_param["p_strValue"] = html_entity_decode(isys_glob_unescape($p_param["p_strValue"]));
                
                                if (is_null($p_param["p_nSize"])) {
                                        $p_param["p_nSize"] = "40";
                --
                1.7.0.4</root@02-cmdb01.(none)> 
                
                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dainis
                  last edited by

                  Thank You tolik25251!
                  It seems that this patch works. Persons at least now showing correctly. I'll watch what will happen in other sections.
                  Once again, thank you very much, tolik25251 You're the best!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post