将 vcard 3.0 转换为 URL
我需要将 vcard 版本 3.0 转换为 URL。基本上像这样的电子名片:
BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD
应该转换成这样的 URL:
BEGIN%3AVCARD%0A
VERSION%3A3.0%0A
N%3AGump%3BForrest%0A
FN%3AForrest%20Gump%0A
ORG%3ABubba%20Gump%20Shrimp%20Co.%0A
TITLE%3AShrimp%20Man%0A
TEL%3BTYPE%3DWORK%2CVOICE%3A%28111%29%20555-1212%0A
TEL%3BTYPE%3DHOME%2CVOICE%3A%28404%29%20555-1212%0A
ADR%3BTYPE%3DWORK%3A%3B%3B100%20Waters%20Edge%3BBaytown%3BLA%3B30314%3BUnited%20States%20of%20America%0A
LABEL%3BTYPE%3DWORK%3A100%20Waters%20Edge%5CnBaytown%2C%20LA%2030314%5CnUnited%20States%20of%20America%0A
ADR%3BTYPE%3DHOME%3A%3B%3B42%20Plantation%20St.%3BBaytown%3BLA%3B30314%3BUnited%20States%20of%20America%0A
LABEL%3BTYPE%3DHOME%3A42%20Plantation%20St.%5CnBaytown%2C%20LA%2030314%5CnUnited%20States%20of%20America%0A
EMAIL%3BTYPE%3DPREF%2CINTERNET%3Aforrestgump%40example.com%0A
REV%3A20080424T195243Z%0A
END%3AVCARD
我该怎么做?
I need to convert a vcard version 3.0 into URL. Basically a vcard like this:
BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:[email protected]
REV:20080424T195243Z
END:VCARD
should be converted into a URL like this:
BEGIN%3AVCARD%0A
VERSION%3A3.0%0A
N%3AGump%3BForrest%0A
FN%3AForrest%20Gump%0A
ORG%3ABubba%20Gump%20Shrimp%20Co.%0A
TITLE%3AShrimp%20Man%0A
TEL%3BTYPE%3DWORK%2CVOICE%3A%28111%29%20555-1212%0A
TEL%3BTYPE%3DHOME%2CVOICE%3A%28404%29%20555-1212%0A
ADR%3BTYPE%3DWORK%3A%3B%3B100%20Waters%20Edge%3BBaytown%3BLA%3B30314%3BUnited%20States%20of%20America%0A
LABEL%3BTYPE%3DWORK%3A100%20Waters%20Edge%5CnBaytown%2C%20LA%2030314%5CnUnited%20States%20of%20America%0A
ADR%3BTYPE%3DHOME%3A%3B%3B42%20Plantation%20St.%3BBaytown%3BLA%3B30314%3BUnited%20States%20of%20America%0A
LABEL%3BTYPE%3DHOME%3A42%20Plantation%20St.%5CnBaytown%2C%20LA%2030314%5CnUnited%20States%20of%20America%0A
EMAIL%3BTYPE%3DPREF%2CINTERNET%3Aforrestgump%40example.com%0A
REV%3A20080424T195243Z%0A
END%3AVCARD
How do I do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用java,您可以阅读 这里
If you are using java, you can read here