mapbox / mapbox/utfgrid-spec

trouble with demo.json validation

Open
#1 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
153
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I'm trying to [write some tests](https://github.com/tschaub/openlayers/blob/19a11561e82bb99eff2d005cbe3b8287b68872f6/tests/Tile/UTFGrid.html#L200) for a browser implementation that use the [demo.json](https://github.com/mapbox/mbtiles-spec/blob/master/1.1/demo.json) described in the spec. I'm seeing trouble once I hit row 215, col 222 - the 55262th id. If I understand right, this should be "encoded" as 55296. I notice that [some parsers](https://www.google.com/search?q=utf8+55296+57343) mention 55296 to 57343 as a range where UTF-16 surrogate pairs cannot be converted to UTF-8.

I'm serving up my tests (with ``) and demo.json with Apache to Chrome 17 (same behavior on Firefox 10). Thanks for any hints on what might be up. I'm not entirely confident this is UTF-8 through and through.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the UTFGrid.html test linked at tests/Tile/UTFGrid.html#L200 and inspect demo.json from the MBTiles specification around row 215, column 222. Reproduce the behavior in Chrome or Firefox while serving the files with Apache, then compare how the 55262th id is represented and document the expected validation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, json
Domain
internationalization, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.