Skip to content

UTF-8 BOM causes error #261

@thehappycheese

Description

@thehappycheese

Description

Opening a UTF-8 file containing a byte order mark (BOM) causes an error and the map viewer fails to load.

Reproduce

  1. Try to open a UTF-8 .geojson file file starting with binary 0xFEFF (The UTF-8 Byte Order Mark or BOM).
  2. A popup appears reading Renderer Failure: new ims export features.geojson. Unexpected token  in JSON at position 0 See screenshot below:

Screenshot 2021-08-18 163733

Also note in the above screenshot that Jupyter's text editor also incorrectly shows the BOM as a red dot. Opening the same .geojson file in VS Code works as expected; the the BOM is hidden.

Context

  • Operating System and version: Windows 10
  • Python Version: 3.9
  • Browser and version: Chrome
  • JupyterLab version: 3.0.16

The troublesome geojson file is the result of an export from an ESRI Web AppBuilder application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions