{"action":"closed","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2521","repository_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2521/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2521/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2521/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/issues/2521","id":59244150,"number":2521,"title":"Labels do not work for surrogate pairs","user":{"login":"mramato","id":1495196,"avatar_url":"https://avatars2.githubusercontent.com/u/1495196?v=4","gravatar_id":"","url":"https://api.github.com/users/mramato","html_url":"https://github.com/mramato","followers_url":"https://api.github.com/users/mramato/followers","following_url":"https://api.github.com/users/mramato/following{/other_user}","gists_url":"https://api.github.com/users/mramato/gists{/gist_id}","starred_url":"https://api.github.com/users/mramato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mramato/subscriptions","organizations_url":"https://api.github.com/users/mramato/orgs","repos_url":"https://api.github.com/users/mramato/repos","events_url":"https://api.github.com/users/mramato/events{/privacy}","received_events_url":"https://api.github.com/users/mramato/received_events","type":"User","site_admin":false},"labels":[{"id":626674128,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels/category%20-%20labels","name":"category - labels","color":"bfdadc","default":false},{"id":653779,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels/type%20-%20bug","name":"type - bug","color":"d7e102","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-02-27T14:40:32Z","updated_at":"2017-12-01T17:13:29Z","closed_at":"2017-12-01T17:13:29Z","author_association":"MEMBER","body":"As discussed [on the forum](https://groups.google.com/d/msg/cesium-dev/6EA78tUxGRY/xMr9cfJGS1IJ) JavaScript treats surrogate pairs as two characters, when in reality they are one.\n\nTo reproduce:\n\n``` javascript\nvar viewer = new Cesium.Viewer('cesiumContainer');\nvar scene = viewer.scene;\nvar camera = viewer.scene.camera;\n\ncamera.lookAt(Cesium.Cartesian3.fromDegrees(100.5382368,13.8, 50000),\n                     Cesium.Cartesian3.fromDegrees(100.5382368,13.7242002, 0),\n                     Cesium.Cartesian3.UNIT_Z);\n\nvar labels = scene.primitives.add(new Cesium.LabelCollection());\nlabels.add({\n    position : Cesium.Cartesian3.fromDegrees(100.545624,13.743179),\n    text     : 'ตึก'\n});\n```\n\nThe easiest short-term work around for this is to use a Billboard instead (writeTextToCanvas works fine, this problem is specific to LabelCollection).\n"}}
{"actor":{"display_login":"hpinkos"}}