Skip to content

Mapper does not support surrogate pairs in text objects #2511

@dl3sdo

Description

@dl3sdo

Mapper does not consider surrogate pairs in the text object editor, i.e. any chars not inside the BMP (see Wikipedia).
While this does not affect most use cases, it will lead to file corruption if a text object with single 16-bit values that are within the surrogate range exists (e.g., a surrogate pair was split).
End of the .omap file:
<object type="4" symbol="156" h_align="1" v_align="2"><coords count="1">96839 27067;</coords><text></></>< ="" ="">< ="">123255 78068;100740 78000;86288 77955;86602 76852;88110 77108 32;89977 76500 32;90030 73163 32;88913 72428 32;87518 72195 32;89100 68573 32;90375 66968 32;92318 65775 32;97658 64043 32;98828 66338 32;99015 70133 32;99420 72615 32;99830 75218;100312 75150;100140 74078 32;101100 72630 32;101790 72075 32;107190 71760 32;108248 67448 32;108922 64867 32;106598 63195 32;107655 61920 32;111960 62662 32;111960 63435 32;112493 63525 32;112815 62798 32;116250 63278 32;116625 63810 32;116685 64575 32;117608 64537 32;118470 64845 32;120735 65085 32;121703 65018 32;121748 65505 32;122558 65415 32;122753 64927 32;124455 64477;124462 64477;124440 73020;124433 75435;124111 77128;124110 77273 32;123810 77820 32;123255 78068 18;</>< ="">< ="" =""/></></>< ="" ="">< ="">121553 59528;121439 58455;</>< ="">< ="" =""/></></>< ="" ="">< ="">116653 56713;117190 57143;</>< ="">< ="" =""/></></>< ="" ="">< ="">76454 69284 1;76718 68677;76558 67267;77219 67267 1;77998 67267;78614 67769;79287 68161 1;79838 68483;80015 68692;79983 69329 1;79944 70111;79815 70424;79400 71088 1;79109 71553;78866 71605;78394 71326 1;77756 70949;77405 70721;76734 70407 1;76325 70215;76274 69698;76454 69284 18;</>< ="">< ="" =""/></></>< ="" ="">< ="">77063 67349 1;76453 67626;75900 67627;75582 68217 1;75244 68844;74745 69296;75021 69953 1;75367 70774;75898 71195;76756 71433 1;77650 71681;78202 71510;79130 71510;77063 67349 18;</>< ="">< ="" =""/></></>< ="" ="">< ="">82742 72759 1;82742 73189;83015 74001;83319 73697 1;83634 73382;83828 73182;83969 72759 1;84262 71880;83434 70554;84205 70040 1;84646 69746;85256 68794;84782 68557 1;84017 68174;83147 68721;82922 69546 1;82591 70758;82742 71502;82742 72759 18;</>< ="">< ="" =""/></></>< ="" ="">< ="">105741 43279;105210 46148 32;103665 45893 32;102345 45045 32;97583 44123 32;92226 43370 32;89579 43106;88851 42674 32;88282 41889 32;88302 41376;89016 40811;89808 40565;92475 40692 32;97361 41391 32;97728 41725 32;101055 42329 32;105741 43279 18;</>< ="">< ="" =""/></></>< ="" ="">< ="">115695 62535 32;109928 61552 32;109860 60953 32;109373 60953 32;109320 61425 32;108135 61223;109253 59775;109823 56783 32;111727 56595 32;111330 53880 32;113468 53595 32;115485 48720 32;118740 48135 32;118710 47550 32;121255 47315;121230 46298;124515 46223;124523 46223;124500 53093;123450 52935 32;121650 53093 32;121613 52867 32;121387 52748 32;121364 51785;120337 51300 32;120278 50835 32;119025 50430 32;117915 50453 32;117608 50100 32;116873 50168 32;116925 51180 32;117585 51600 32;118268 51563 32;118598 51802 32;119370 51802 32;119723 51518 32;120908 52148 32;120893 53332 32;119422 53820 32;118193 54563 32;117128 54653 32;117128 55260 32;116828 55545 32;115005 55755 32;115087 56145 32;115433 56115 32;115575 57052 32;114968 58635 32;113145 58860 32;113198 59213 32;114908 59025 32;115087 60465 32;114292 60608 32;114345 61095 32;115110 61005 32;115695 62535 50;</>< ="">< ="" =""/></></>< ="" ="">< ="">69135 68858 1;71648 70628;73065 71580;75713 73440 1;77543 74738;78413 75458;80175 76845 1;80723 77288;81060 77535;81510 77940;</>< ="">< ="" =""/></></></></></>< ="" ="">< ="" ="" ="" =""/></><>< ="" ="" ="" ="" ="" ="" ="" ="" ="" =""/>< ="" ="" ="" ="">< ="" =""/>< =""/></></>< ="" ="" ="" ="">< ="" ="" ="" ="">< ="" =""/>< ="" ="" ="" =""/></>< ="" ="" ="" ="" =""/></></>< ="" =""><>< ="">< ="">< =""/></>< ="">< ="" ="" ="" ="">< ="">96839 27067;</><></></></></></><></></></>

UnsupportedSurrogatePairs.mp4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions