Bug 889397 - Unicode surrogates cause odd cursor movement in the editor
Summary: Unicode surrogates cause odd cursor movement in the editor
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Damian Jansen
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-21 03:25 UTC by Sean Flanigan
Modified: 2014-03-24 05:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-24 05:01:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Sean Flanigan 2012-12-21 03:25:00 UTC
Description of problem:
The codemirror editor we are using does not properly support some unicode characters, such as this one: "

Comment 1 Sean Flanigan 2012-12-21 07:41:36 UTC
I guess bugzilla can't handle that character either!

Here's the report again, without the character itself:


Description of problem:
The codemirror editor we are using does not properly support some unicode characters, such as this one: http://www.codetable.net/decimal/119558

Version-Release number of selected component (if applicable):
2.0.3 (20121129-1831)

How reproducible:
100%

Steps to Reproduce:
1. Enter an ASCII character, eg "A".
2. Paste the character "

Comment 2 Sean Flanigan 2012-12-21 07:44:03 UTC
Oops, broke bugzilla again.

Steps to Reproduce:
1. Enter an ASCII character, eg "A".
2. Paste the character [from http://www.codetable.net/decimal/119558 ] into a textflow target
3. Press the left arrow twice.
  
Actual results:
Cursor appears just before the Unicode character.

Expected results:
Cursor appears before the A character.

Additional info:
See also https://github.com/ajaxorg/ace/issues/1153 for a similar bug in ACE

Even stranger cursor behaviour can be found if you press backspace after pasting the Unicode character, because it deletes only one of the surrogates.

Comment 3 Ding-Yi Chen 2014-03-24 05:01:48 UTC
Tested with Zanata 3.4.0-SNAPSHOT (20140321-1747)
I cannot reproduce this bug, it might be fixed in code mirror upgrade.


However, as a note: I did find that I cannot save the character "U+1D306 TETRAGRAM FOR CENTRE" because of the limitation of MySQL
(See http://dev.mysql.com/doc/refman/5.1/en/faqs-cjk.html#qandaitem-B-11-1-16)

For mysql >= 5.5.3, the setting encoding as utf8mb4 should fix the problem,
but there are no feasible solutions for earlier versions.


Note You need to log in before you can comment on or make changes to this bug.