Giter Club home page Giter Club logo

Comments (4)

kelseykm avatar kelseykm commented on August 30, 2024

Hello @fts11259375,

Thank you for you using vcard4, and for your valuable contribution to the vcard4 community (this issue).

This library is dedicated to strictly adhering to the vCard version 4.0 specification (RFC6350). This means that we stay true to the guidelines set forth in the official specification without introducing any additional features or deviating from it.

Allow me to provide some brief historical context to this character set issue. In early versions of vcards, specifically version 2.1 and earlier, the default character set of vcards was ASCII, but this could be overridden in specific properties using the "CHARSET" property parameter (very much like what you're doing).

However, for later versions, 3.0 and 4.0, the charset for vCard is UTF-8. There is no way to override this and it is invalid to specify a value other than "UTF-8" in a "charset" MIME parameter (see section 3.1 of the RFC).

In fact, in version 4.0 vCards, the "CHARSET" property parameter is intentionally removed from the vCard specification (see Appendix A2 of the RFC). This was also the case for vCard 3.0.

In conclusion, this feature WILL NOT be included in the vcard4 library, because the library remains true to RFC 6350 and its extensions.

from vcard4.

kelseykm avatar kelseykm commented on August 30, 2024

Let me provide some insight into the issue you're currently facing. It seems that the root of the problem might stem from the vCard version compatibility.

It's worth noting that the most widely used vCard version is vCard 2.1. Considering the symptoms you're encountering, it's possible that the device you're using to test your code doesn't support vCard 4.0 and might be limited to vCard 2.1 compatibility.

If we take a closer look at the historical context I provided in the earlier comment, the pattern you're employing (such as adding CHARSET to properties) was common in vCard 2.1. This suggests that if your device only responds positively to this approach, it likely supports only vCard 2.1.

Given this, I'd recommend considering two options. First, you could explore using a different device for testing, one that supports vCard 4.0. Alternatively, you might want to consider utilizing a library that generates vCard 2.1 vcards. Either approach should help align your code and device compatibility.

Feel free to reach out if you have any questions or need further assistance.

from vcard4.

fts11259375 avatar fts11259375 commented on August 30, 2024

from vcard4.

kelseykm avatar kelseykm commented on August 30, 2024

I believe both issues stem from the same root cause.

Many manufacturers seem to deviate from the vCard specification. I'm convinced that some don't even verify the vCard version before parsing it. I think in pursuit of the 'Robustness Principle,' they often adopt a "mongrel" parser that handles different vCard versions, but leaning heavily towards vCard 2.1 parsing functionalities

from vcard4.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.