Re: about vcard encoding
"Jianbiao Guo" <[email protected]> Fri, 26 May 2006 09:34:39 +0800
| Newsgroups | gmane.ietf.vcard |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_52630_17582912.1148607279801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,dealey Thanks for your replying.In vcard2.1,we can specify the property parameter"CHARSET" equal to "UTF-8",then the vcard reader can know the property value is using UTF-8 .and then the UTF-8 value can be converted into Unicode.You will not lose anything because the UTF-8 is the encoding format of Unicode.In Unicode,almost all the characters using by human are contained.if your platform support Unicode,you can display it directly to the user.In vcard3.0,this property parameter is moved to the mail header.soif you want to use the property parameter in your vcard,I think you'd better compliant to vcard2.1 standard not vcard3.0. About my question,I want to explain it again as follows: Because a vcard can describe as a line consisting of three parts:property name(for example ,"N","TEL","ADR")+property parameters(for example ,"ENCODING","CHARSET")+property values.My question is about the property name and property parameters.Because the property name and property parameters is used as a notation,so I think in all vcard,the two parts should be encoded in same character set and encoding so that different platform can communicate seamlessly.But in the formal definition of vcard2.= 1and vcard3.0 which is written using the ABNF,I only know that the two parts are defined as terminal values(for example,name =3D "LOGO"/"PHOTO").I have chec= ked the ABNF specification (RFC 2234).It say that the string using the us-ascii character set and the external encoding is not specified.Then my clear question is that if the two parts in a vcard line can be encoded in different format(for example,ASCII,UNICODE) or only encoded using ASCII and where can i find the document saying about it. Thanks Best Regards John Guo 2006/5/26, S. Isaac Dealey <[email protected]>: > > > > Hi,all > > I am writing a lib about parsing a vcard into one > > class.and I want to know > > if the property name and property parameters must be > > encoded in US-ASCII .If > > the format is not standard,different platform will can not > > communicate with > > each other. > > Clarification of this would be helpful for me also. I've been reading > the RFC's and my understanding is that the file must be 7-bit ASCII > which means anything that's not ASCII needs to be represented with an > ASCII encoding. The property names shouldn't be an issue, because > they're all part of the standard and therefore all ASCII, but property > values may contain other types of characters. > > Certainly it would make sense for someone who speaks only non-latin > languages to be able to include non-latin notes in their vCard. > > The specification for vCard 2.1 included two forms of encoding which > are described specifically for solving the problem of binary > (graphics, sounds) and multi-line content (a postal address with line > breaks for exmaple) and I assume both of these methods also address > the problem of non-latin characters, being the existing standards of > Quoted-Printable and Base64 encoding (which is specifically a text > representation of binary data). > > The specification for vCard version 3.0 no longer supports the > Quoted-Printable encoding, requiring all content to be Base64 encoded > (although RFC2426 unfortunately never mentions Base64 encoding, > instead referring only to "B" as the designation for brinary encoding, > without specifying that it must be Base64 encoded and neither the > vCard 2.1 specification or the RFCs for 3.0 mention the RFCs for the > encoding - 1421 & 2045 - found those on Wikipedia). > > So the question I have (and this may be a "clueless newbie" question) > is how would an application receiving a vCard for import know that > Base64 encoded data is intended to be UTF8 containing non-latin > characters? > > > s. isaac dealey 434.293.6201 > new epoch : isn't it time for a change? > > add features without fixtures with > the onTap open source framework > > http://www.fusiontap.com > http://coldfusion.sys-con.com/author/4806Dealey.htm > > ------=_Part_52630_17582912.1148607279801 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <div>Hi,dealey </div> <div> Thanks for your replying.In vcard2.1,we can specify the propert= y parameter"CHARSET" equal to "UTF-8",then the vcard re= ader can know the property value is using UTF-8 .and then the UTF-8 value c= an be converted into=20 Unicode.You will not lose anything because the UTF-8 is the encoding format= of Unicode.In Unicode,almost all the characters using by human are contain= ed.if your platform support Unicode,you can display it directly to the=20 user.In vcard3.0,this property parameter is moved to the mail header.so if = you want to use the property parameter in your vcard,I think you'd better c= ompliant to vcard2.1 standard not vcard3.0.</div> <div> About my question,I want to explain it again as follows:</div> <div> Because a vcard can describe as a line consisting of three part= s:property name(for example ,"N","TEL","ADR")= +property parameters(for example ,"ENCODING","CHARSET")= +property=20 values.My question is about the property name and property parameters.Becau= se the property name and property parameters is used as a notation,so I thi= nk in all vcard,the two parts should be encoded in same character set and e= ncoding so that different platform can communicate=20 seamlessly.But in the formal definition of vcard2.1 and vcard3.0 which is w= ritten using the ABNF,I only know that the two parts are defined as termina= l values(for example,name =3D "LOGO"/"PHOTO").I have ch= ecked the ABNF specification (RFC 2234).It say that the string using the us= -ascii character set and the external encoding is not=20 specified.Then my clear question is that if the two parts in a vcard line c= an be encoded in different format(for example,ASCII,UNICODE) or only encode= d using ASCII and where can i find the document saying about it.<= /div> <div> </div> <div> Thanks </div> <div>Best Regards</div> <div> </div> <div>John Guo <br><br> </div> <div><span class=3D"gmail_quote">2006/5/26, S. Isaac Dealey <<a href=3D"= mailto:[email protected]">[email protected]</a>>:</span> <blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0= px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>> Hi,all<br>> &nb= sp; I am writing a lib about parsing a vcard into one<br>> c= lass.and I want to know <br>> if the property name and property parameters must be<br>> encod= ed in US-ASCII .If<br>> the format is not standard,different platform wi= ll can not<br>> communicate with<br>> each other.<br><br>Clarificatio= n of this would be helpful for me also. I've been reading <br>the RFC's and my understanding is that the file must be 7-bit ASCII<br>= which means anything that's not ASCII needs to be represented with an<br>AS= CII encoding. The property names shouldn't be an issue, because<br>they're = all part of the standard and therefore all ASCII, but property <br>values may contain other types of characters.<br><br>Certainly it would= make sense for someone who speaks only non-latin<br>languages to be able t= o include non-latin notes in their vCard.<br><br>The specification for vCar= d=20 2.1 included two forms of encoding which<br>are described specifically for = solving the problem of binary<br>(graphics, sounds) and multi-line content = (a postal address with line<br>breaks for exmaple) and I assume both of the= se methods also address <br>the problem of non-latin characters, being the existing standards of<br= >Quoted-Printable and Base64 encoding (which is specifically a text<br>repr= esentation of binary data).<br><br>The specification for vCard version=20 3.0 no longer supports the<br>Quoted-Printable encoding, requiring all cont= ent to be Base64 encoded<br>(although RFC2426 unfortunately never mentions = Base64 encoding,<br>instead referring only to "B" as the designat= ion for brinary encoding, <br>without specifying that it must be Base64 encoded and neither the<br>vC= ard 2.1 specification or the RFCs for 3.0 mention the RFCs for the<br>encod= ing - 1421 & 2045 - found those on Wikipedia).<br><br>So the question I= have (and this may be a "clueless newbie" question) <br>is how would an application receiving a vCard for import know that<br>B= ase64 encoded data is intended to be UTF8 containing non-latin<br>character= s?<br><br><br>s. isaac dealey 434.293.6201<br>new e= poch : isn't it time for a change? <br><br>add features without fixtures with<br>the onTap open source framewo= rk<br><br><a href=3D"http://www.fusiontap.com">http://www.fusiontap.com</a>= <br><a href=3D"http://coldfusion.sys-con.com/author/4806Dealey.htm">http://= coldfusion.sys-con.com/author/4806Dealey.htm </a><br><br></blockquote></div><br> ------=_Part_52630_17582912.1148607279801--