No announcement yet.

Error message when trying to post arabic characters : Please enter a message with at least 1 character

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error message when trying to post arabic characters : Please enter a message with at least 1 character


    Our forum is in french but we often post arabic characters. Our database tables always used latin1_swedish and we never had this problem till the last time we restored the database (with GoDaddy restore tool, which we already used in the past).

    When one or more arabic characters are entered in a post (containing a french text or not), that error message is displayed and the message can't be posted. (Opening the code mode of the editor yields also an error and erases the message.)

    Here are some messages which are printed in Firefox' console when it happens :

    vBulletin.loadingIndicator.hide Counter: 1 Source: ajaxStop footer-rollup-524.js:337:14833
    ajaxForm complete (vBulletin.contentEntryBox.initAjaxFormSubmit) ckeditor-rollup-524.js:61:20555
    vBulletin.loadingIndicator.hide Counter: 0 Source: Unspecified footer-rollup-524.js:337:14833

    How can we fix that ?

    We have :
    vb 5.2.4 patch 2
    php 5.4
    MySQL 5.5
    Last edited by Abdarrahmaan; Wed 23 Nov '16, 11:51pm.

  • #2
    We tried several things, to no avail :

    - the forum's HTLM charset is ISO-8859-1, like in the database
    - creating a new style did not resolve the issue
    - nor restoring the parameters, styles and languages with tools.php
    - nor scanning, optimizing & repairing the tables
    - nor emptying the cache

    Any clue ?


    • #3
      We find that the error is caused by the 5.2.4 upgrade.

      And that changing the charset to utf8 may solve the problem, but I don't know how to do that without breaking the forum or it resulting in bad displaying of characters.

      Can someone tell me how to do it (go to utf8) ? Do I just need to convert some database content to unicode and change the charset in the admin panel and that's all ?

      (I tried to change the collations in the database using the change_collations script, and to change the charset in the forum config file, but that broke the forum. Just changing the charset in the forum admin panel does not display the characters rightly)
      Last edited by Abdarrahmaan; Mon 12 Dec '16, 5:38pm.


      • #4
        If you google "convert mysql to UTF-8" there is a lot of information on it. Its fairly easy to do, just depending on your size of your DB could take a while.
        Once that is done you should be able to go to the language settings and change it from ISO-8859-1 to UTF-8 and everything should display correctly.
        Really recommend backing up your data first, and doing this on a dev/test site first to make sure.


        • #5

          I did it, and it works for the new posts I create, but the french characters in old posts, old forums' and topics' names and in other places like the menu of the admin panel do not display correctly : I see "�" instead of the characters é, è, â...

          And the french characters (I mean even "a, b, c") don't display at all in old posts, only the arabic characters display now !

          I changed the connection charset of the database in the config file to the one displayed in phpMyAdmin... same result.
          Last edited by Abdarrahmaan; Wed 14 Dec '16, 9:28am.


          • #6
            traidnt they convert the database

            360 saudi riyal



            • #7
              Thank you but I can't do that though.


              • #8
                I checked that the content of the tables is in utf8, using this query :

                [URL="http://localhost/phpmyadmin/url.php?"]SELECT[/URL] CONVERT(CONVERT(username USING [URL="http://localhost/phpmyadmin/url.php?"]BINARY[/URL]) USING latin1) AS latin1,
                CONVERT(CONVERT(username USING [URL="http://localhost/phpmyadmin/url.php?"]BINARY[/URL]) USING utf8) AS utf8
                FROM [URL="http://localhost/phpmyadmin/url.php?"]user[/URL] WHERE userid=24
                The result in utf8 was good, but this same user name is still displayed incorrectly on the forum...
                Last edited by Abdarrahmaan; Thu 15 Dec '16, 9:16am.


                • #9
                  I followed this when I converted mine. I had no issues. Full link here:
                  Of course make a back up before doing this.
                  Use HeidiSQL. Its free and a very good db tool.
                  From tools menu, enter Bulk table editor
                  Select the complete database or pick tables to convert,
                  • tick Change default collation: utf8mb4_general_ci
                  • tick Convert to charset: utf8
                  This converts complete database from latin to utf8 in just a few seconds.
                  The above fixed my issues with weird chars.


                  • #10
                    It still didn't work so I chose to restore an older version and not to upgrade.

                    It's like vb 5.2.4 is converting the data in latin1 at some step even when we tell it to use utf8 (in the language charset, in the config file, after having converted the database in utf8). Uncommenting the "utf8" line in the config file even gives an error. I verified the data in the database' content is in utf8 and the forum page too.


                    • #11
                      Just out of curiosity was it working with English, just not Arabic correct? Or is it saying that for all. I found when I upgraded to 5.2.5 there was a setting, I cannot remember what its called but if you search for "Maximum Characters" in all settings I found it was set to 1. This was my issue. Maybe not for you. But worth a check.


                      • #12

                        was it working with English, just not Arabic correct
                        Only when arabic characters were typed in a post (even when there were many other french/latin characters)... and sometimes (when I changed the encodings) quite the opposite : only arabic characters in the posts were showed (the french characters were showed too only if they were quoted or between other BBCode tags if I remember well).


                        Related Topics