Skip to content

Update VOTable to handle UTF-8 #55

Closed

Description

@Zarquan

As part of the group looking at updating our standards to be compatible with 2020 technologies, I propose that we update the VOTable standard to handle the full UTF-8 characters set.

Issue DALI#33 is looking at adding support for xtype="json".

If we do adopt this new xtype, it allows a client to create a VOTable column with datatype="unicodeChar", arraysize="*", xtype="json".

This implies that the client can populate this column with ANY valid JSON document and upload it to a TAP service. Including JSON content that contains UTF-8 characters.

Using the current VOTable standard, some of the UTF-8 characters may end up being truncated to fit into the UTF-2 character set. Which is not the expected behaviour.

To resolve this:

  1. Any changes to the DALI documents that propose xtype="json" MUST include a caveat in the text that explicitly restricts the JSON content to the UTF-2 character set.
  2. We work to develop a new version of the VOTable standard which includes support for the full UTF-8 character set.

Activity

  1. Zarquan commented on Dec 15, 2023

    @Zarquan
    MemberAuthor

    (1) is deliberately awkward.

    Making the restriction glaringly obvious in the DALI document prevents us from endorsing xtype="json" in DALI and promising to fix VOTable at a later date without doing anything about it.

  2. msdemlei commented on Dec 15, 2023

    @msdemlei
    Collaborator
  3. msdemlei commented on Jun 11, 2025

    @msdemlei
    Collaborator

    At the College Park interop, I've said this about the problem: https://wiki.ivoa.net/internal/IVOA/InterOpJune2025Apps/unicode-notes.pdf

    TL;DR: I think we should allow 8-bit characters in char and tell people to interpret the whole string in utf-8; but the arraysize is still the number of bytes, not codepoints. Main wart from my point of view: a single character can only contain an ASCII character, and a single character can never have its high bit 1.

  4. pdowler commented on Jun 23, 2025

    @pdowler
    Contributor

    From my reading of the VOTable spec, the arraysize is the number of values of the datatype (the length of the double[] or char[]) and not the number of bytes to encode it. When you say "arraysize is still the number of bytes" are you saying that's already true or that this becomes the new definition (across all table serialisations)?

  5. msdemlei commented on Jun 25, 2025

    @msdemlei
    Collaborator
  6. mbtaylor commented on Feb 2, 2026

    @mbtaylor
    Member

    Updating VOTable to handle UTF-8 has been addressed by the now merged #71. That PR doesn't have anything to say about JSON which is also mentioned in this issue, but since that seems to be peripheral to the title of this issue, I'm closing it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions