Skip to content

Javadocs incorrect for Table string values  #185

Description

@jcookems

The javadocs in

  • .../services/table/models/EdmType.java:64 KB in size.
  • .../services/table/models/Entity.java
  • .../services/table/models/Property.java

all have the following text, referring to string values:

A UTF-16-encoded value. String values may be up to 64 KB in size.

It should say:

A Unicode string value. String values may be up to 64 KB in size.

At best, the original message is misleading, at worst just wrong. The doc at http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx says the same thing, and it is likely because strings are stored on the server as UFT-16 (because it is .NET). But one shouldn't try to force UTF-16; the encoding on the wire should match the headers in the HTTP/XML packet. For example, here is part of a response, showing that in this case the server elected to use the UTF-8 encoding for Unicode code points:

Content-Type: application/atom+xml;charset=utf-8
<?xml version="1.0" encoding="utf-8" standalone="yes"?>

The intent of the comment is that Table storage accepts Unicode strings. The mechanics of what encoding is used for the bits that get sent across the wire (UTF-16, UTF-8, GB18030, etc.) should be handled by handshakes between the SDK and the Azure server; the user does not need to worry about encoding in Java (which treats strings as Unicode).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions