Skip to content

Issue with generation for Address within Kosovo #420

Closed
@hellmer1234

Description

@hellmer1234

Type of issue

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

Expected Behavior

When i put XK as country code within a contact address, i could generate a valid swissQRCode
as XK is a valid ISO 3166-1 alpha-2 code for Kosovo (https://laendercode.net/fr/country/xk)

Current Behavior

When trying to use XK as country code, i encounter the following error :
Country must be a valid "two letter" country code as defined by ISO 3166-1, but it isn't.
Stacktrace: at QRCoder.PayloadGenerator.SwissQrCode.Contact..ctor(String name, String zipCode, String city, String country, String streetOrAddressline1, String houseNumberOrAddressline2, AddressType addressType)

Possible Solution (optional)

In private static HashSet ValidTwoLetterCodes() add the ISO-3166-1 code for Kosovo (as describe here :https://laendercode.net/fr/country/xk)

Steps to Reproduce (for bugs)

When trying the following strings in the payload, i encounter an error :

  • Country : XK

Your Environment

  • Compiled from source or NuGet package?: Nuget Package
  • Version used : QRCoder 1.3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions