Issue Details (XML | Word | Printable)

Key: MDL-6322
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Martin Dougiamas
Reporter: Jussi Hannunen
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Internal Messages get cut a first non-ascii letter

Created: 23/Aug/06 02:38 AM   Updated: 24/Aug/06 02:47 PM
Component/s: Messages
Affects Version/s: 1.6.1
Fix Version/s: 1.6.2

Environment: MySQL 5.0.22, PHP 4.3.10, Apache 1.3.33, Debian Linux
Issue Links:
Cloners
 

Database: MySQL
Participants: Eduardo Hernandez, Jussi Hannunen and Martin Dougiamas
Security Level: None
Affected Branches: MOODLE_16_STABLE
Fixed Branches: MOODLE_16_STABLE


 Description  « Hide
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.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 23/Aug/06 11:47 AM
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?


Jussi Hannunen added a comment - 23/Aug/06 02:32 PM
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?


Jussi Hannunen added a comment - 23/Aug/06 05:54 PM
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.


Eduardo Hernandez added a comment - 24/Aug/06 01:28 PM
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


Martin Dougiamas added a comment - 24/Aug/06 02:47 PM
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.