Moodle

Internal Messages get cut a first non-ascii letter

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.6.1
  • Fix Version/s: 1.6.2
  • Component/s: Messages
  • Labels:
    None
  • Environment:
    MySQL 5.0.22, PHP 4.3.10, Apache 1.3.33, Debian Linux
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_16_STABLE
  • Fixed Branches:
    MOODLE_16_STABLE

Description

Messages sent with Internal Messaging get cut at the first 'ä' or 'ö' character. (Only checked those two, could affect many more characters). Messages that contain only ascii characters work fine.

Messages show up truncated in the database too. However, messages delivered as email have all the whole message, but it is a bit messed up. The problem characters are replaced with ? character. (That's a small black square on one of its corners with a question mark in the centre, in case it doesn't show up right.)

I have been hitting some other unicode-related issues as well, but on the whole the migration went well and system seems to be working.

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Is this happening on new messages you are sending on a system that you already upgraded?

Can you check your tables using the MYSQL admin plugin or phpmyadmin ... are they all set to be Unicode?

Show
Martin Dougiamas added a comment - Is this happening on new messages you are sending on a system that you already upgraded? Can you check your tables using the MYSQL admin plugin or phpmyadmin ... are they all set to be Unicode?
Hide
Jussi Hannunen added a comment -

Messages already in the system before upgrade and migration look fine, both on the DB (via phpmyadmin) and in Moodle's message history. No trunc'ing at 'ä' or any other character that I can see.

For the whole database: MySQL charset: UTF-8 Unicode (utf8) , Collation: utf8_unicode_ci.

For specific tables, does the charset show up easily in phpmyadmin somewhere?

Show
Jussi Hannunen added a comment - Messages already in the system before upgrade and migration look fine, both on the DB (via phpmyadmin) and in Moodle's message history. No trunc'ing at 'ä' or any other character that I can see. For the whole database: MySQL charset: UTF-8 Unicode (utf8) , Collation: utf8_unicode_ci. For specific tables, does the charset show up easily in phpmyadmin somewhere?
Hide
Jussi Hannunen added a comment -

I was just tutored by our intern on SHOW CREATE TABLE.

Tables mdl_message, mdl_message_contact and mdl_message_read all have default charset utf8.

Show
Jussi Hannunen added a comment - I was just tutored by our intern on SHOW CREATE TABLE. Tables mdl_message, mdl_message_contact and mdl_message_read all have default charset utf8.
Hide
Eduardo Hernandez added a comment -

Hi,

Please guys see this http://tracker.moodle.org/browse/MDL-6128 I had reported this, and If I change the line of code posted I can see non-ASCII chars working. I tried giving Petr access, but I was unable to give it as our IT dept. has disabled messaging system.

When I type a non-ascii char, the same window is able to display it (after typing the message), but if I close the window and then I go and see my message history, the message is truncated. The same happens when the other users is displayed the new arrived message. The message is truncated in the DB.

Changing from $message = optional_param('message', '', PARAM_CLEANHTML); to
$message = optional_param('message', '', PARAM_RAW); seems to a workaroung, not good but workaround at least

Show
Eduardo Hernandez added a comment - Hi, Please guys see this http://tracker.moodle.org/browse/MDL-6128 I had reported this, and If I change the line of code posted I can see non-ASCII chars working. I tried giving Petr access, but I was unable to give it as our IT dept. has disabled messaging system. When I type a non-ascii char, the same window is able to display it (after typing the message), but if I close the window and then I go and see my message history, the message is truncated. The same happens when the other users is displayed the new arrived message. The message is truncated in the DB. Changing from $message = optional_param('message', '', PARAM_CLEANHTML); to $message = optional_param('message', '', PARAM_RAW); seems to a workaroung, not good but workaround at least
Hide
Martin Dougiamas added a comment -

This is working for me on moodle.org using the very latest 1.6.1+ .... perhaps it's fixed?

Try the latest CVS version, otherwise let's continue on the related bug.

Show
Martin Dougiamas added a comment - This is working for me on moodle.org using the very latest 1.6.1+ .... perhaps it's fixed? Try the latest CVS version, otherwise let's continue on the related bug.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: