Permalink
Browse files

add demo file to test implementations

  • Loading branch information...
1 parent e92cd92 commit 3d6d1933930cd4f26e9d4b2222795247bf197a77 @kkaefer kkaefer committed Jun 22, 2011
Showing with 3 additions and 0 deletions.
  1. +1 −0 1.1/demo.json
  2. +2 −0 1.1/utfgrid.md
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -228,3 +228,5 @@ An empty key signifies the unavailability of information for that pixel. No acti
}
When minified and gzipped, the resulting file is 2071 bytes with the key to data mapping and 1645 bytes without.
+
+To test implementations, [`demo.json`](https://github.com/mapbox/mbtiles-spec/blob/master/1.1/demo.json) contains a grid that consists of 65501 different keys. This is the maximum possible in this version of UTFGrid. Implementors should check that obtaining a a coordinate should return the key `y * 256 + x` for all x/y, with the exception of y = 255 and x >= 222 and x <= 255 returning 65501 due to the maximum charcode allowed in JSON.

1 comment on commit 3d6d193

I'm curious to hear if there are tests of any browser implementations that use this. In the implementation I'm testing, things start failing at row 215, col 222. This maps to 55296. The range 55296 to 57343 is where some strict parsers fail to convert UTF-16 surrogate pairs to UTF-8.

Any hints on whether this may be a typo in my implementation, a limitation of my browser (same behavior in Chrome 17 and Firefox 10), or something that should be mentioned in the spec? I'm serving demo.json (and my tests) locally. Test page appears to be properly UTF-8. Character encoding is not my strong suit.

Please sign in to comment.