Skip to content

ContactData QR Code generation is wrong #581

@EscolarProgramming

Description

@EscolarProgramming

Type of issue

[x] Bug
[ ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

Locality, Postal Code and Region should be in the correct fields

Current Behavior

The fields mentioned are in the wrong order. On Android, they are usually read anyway and the values are then entered in the wrong fields. On iOS, fields with incorrect values are simply omitted. As a result, the city name, for example, is never transferred.

Possible Solution (optional)

https://github.com/codebude/QRCoder/blob/master/QRCoder/PayloadGenerator/ContactData.cs#L114
The creation of the string is wrong.
Currently:
{street} {houseNumber}, {zipCode}, {city}, {stateRegion}, {country}
Correct:
{street} {houseNumber}, {city}, {stateRegion}, {zipCode}, {country}

Edit: Here's the corresponding RFC: https://www.rfc-editor.org/rfc/rfc6350.html#section-6.3.1
Section 6.3.1.:
ADR-value = ADR-component-pobox ";" ADR-component-ext ";"
ADR-component-street ";" ADR-component-locality ";"
ADR-component-region ";" ADR-component-code ";"
ADR-component-country

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions