Skip to content

Table: Characters encoded by our layer should be automatically decoded #257

Description

@christav

If we put in illegal unicode chararacters, our table layer will encode those characters. But when retrieved, the user gets back not what they put in, but instead the encoding they didn't know about.

Things done by the layer should be automatically undone so the user neither knows nor cares.

For example:

        String partition = "001";
        String row = "insertEntityEscapeCharactersRoundTripsFromService";
        Entity insertedEntity = new Entity().setPartitionKey(partition).setRowKey(row)
                .setProperty("test", EdmType.STRING, "\u0005")
                ;

        service.insertEntity(TEST_TABLE_2, insertedEntity);

        GetEntityResult result = service.getEntity(TEST_TABLE_2, "001", "insertEntityEscapeCharactersRoundTripsFromService");
        assertNotNull(result);

        Entity entity = result.getEntity();

        assertNotNull(entity.getProperty("test"));
        String actualTest1 = (String) entity.getPropertyValue("test");
        assertEquals("", actualTest1);

Note that user stored the string "\u0005" (a single character, unicode code point 5), but what came back was the string ""

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