将vcard 3.0转换为URL

时间:2011-06-10 17:07:21

标签: url vcard

我需要将vcard版本3.0转换为URL。基本上是这样的vcard:

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:forrestgump@example.com
REV:20080424T195243Z
END:VCARD
应将

转换为以下网址:

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

我该怎么做?

1 个答案:

答案 0 :(得分:0)

如果您使用的是java,则可以阅读here