LeetCode.net

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
152Source Integration[All Projects] Generalpublic2010-05-18 04:472010-08-09 09:37
ReporterShahrooz 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary152: unicode characters problem
Descriptionwhen committing comment includes non-English characters (such as Persian or Arabic) this error raises:

Application Error #401
    Database query failed Error #1366
        Incorrect string value for column 'message'
Steps To Reproduceinclude a Persian or Arabic string in a commit comment.
TagsNo tags attached.
Attached Filesjpg file icon Mantis Error.JPG [^] (41,145 bytes) 2010-05-18 04:47

- Relationships

-  Notes
User avatar (212)
Shahrooz (reporter)
2010-05-18 04:52

Source Control Integration 0.16.1
    Subversion Integration 0.16
User avatar (223)
Dennis Somerville (reporter)
2010-06-14 16:24

I get this same issue as well. I received when setting up a new repo and doing an "Import Everything".

Database query failed. Error received from database was #1366: Incorrect string value: '\xD1OL' for column 'filename' at row 1 for the query: INSERT INTO mantis_plugin_Source_file_table ( change_id, revision, action, filename ) VALUES ( ?, ?, ?, ? ).
User avatar (236)
Thijs Putman (reporter)
2010-08-09 09:33

Ran into the same issue; Mantis' DB abstraction layer doesn't seem to handle UTF-8 values that well in this situation...

I applied a quick-and-dirty fix for this problem in SourceChangeset::save() (Source/Source.API.php), added:

$message = iconv('ISO-8859-1', 'ASCII//TRANSLIT', $this->message);

below "$t_changeset_table = ..." (line 860)

Subsequently changed the two queries in the "save" method to utilise "$message" instead of "$this->message".

The above "solution" simply transliterates the SVN commit message back to ASCII (attempting to replace all "special" characters with "regular" ones) before attempting to query the database. Might not be the best long-term solution, but seeing as how commit messages with non-ASCII content are a big exception in my set-up it suffices...

- Issue History
Date Modified Username Field Change
2010-05-18 04:47 Shahrooz New Issue
2010-05-18 04:47 Shahrooz File Added: Mantis Error.JPG
2010-05-18 04:52 Shahrooz Note Added: 212
2010-05-18 04:54 Shahrooz Issue Monitored: Shahrooz
2010-06-14 16:23 Dennis Somerville Issue Monitored: Dennis Somerville
2010-06-14 16:24 Dennis Somerville Note Added: 223
2010-08-09 09:33 Thijs Putman Note Added: 236
2010-08-09 09:37 Thijs Putman Issue Monitored: Thijs Putman


Copyright © 2000 - 2010 MantisBT Group
Time: 0.0657 seconds.
memory usage: 1,905 KB
Powered by Mantis Bugtracker

hosted with
Linode