Comments (4)
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.
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.
from vcard4.
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)
- Safari IOS and MacOS. Unexpected private name #validate. HOT 5
- Support parsing multiple vCards in a single file HOT 3
- Accept "\r\n\t" for line continuation
- "npm run test" fails due to private class fields HOT 3
- Accept bare newlines as well HOT 1
- Does not support property groups HOT 6
- No support for escaped backslashes in parser HOT 3
- Typings are wrong HOT 1
- ExtendedProperty in d.ts has 2 parameters only, missed prop: string HOT 1
- Issue attaching base64 images HOT 20
- Gender identity HOT 1
- Constructor not accept Groups
- [Bug] A hyphen is used after 'X-' in an ExtendedProperty, an 'Invalid property for ExtendedProperty' error occurs
- round trip test case HOT 2
- Backwards compatible with 3.0 cards? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcard4.