CN102385572A - Method for avoiding messy codes caused by import of vCard - Google Patents

Method for avoiding messy codes caused by import of vCard Download PDF

Info

Publication number
CN102385572A
CN102385572A CN2011101806914A CN201110180691A CN102385572A CN 102385572 A CN102385572 A CN 102385572A CN 2011101806914 A CN2011101806914 A CN 2011101806914A CN 201110180691 A CN201110180691 A CN 201110180691A CN 102385572 A CN102385572 A CN 102385572A
Authority
CN
China
Prior art keywords
vcard
file
coded format
read
import
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011101806914A
Other languages
Chinese (zh)
Inventor
曾元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN2011101806914A priority Critical patent/CN102385572A/en
Publication of CN102385572A publication Critical patent/CN102385572A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for avoiding messy codes caused by import of a vCard. The method comprises the following steps of: step 1, starting vCard file import; step 2, detecting the coding format of the vCard file; step 3, judging whether the vCard file comprises the coding format; step 4, if the vCard file comprises the coding format, using the coding format in the vCard file, and if the vCard file does not comprise the coding format, selecting the coding format by a user; step 5, parsing the vCard file; and step 6, ending the process of the vCard file import. The user determines the default coding format, so that the probability of appearance of messy codes can be reduced; the user selects the coding format, so that the time for guessing the coding format is saved, and the import efficiency is improved; and when the problem of messy codes caused by import of the vCard occurs, the user can try to import the vCard file via different formats, so that the user can correctly import the contact finally without executing some conversion works for the vCard file in advance.

Description

A kind of vCard that avoids imports the method that produces mess code
Technical field
The present invention relates to the method that a kind of mobile phone imports the vCard file, particularly relate to a kind of vCard of avoiding and import the method that produces mess code.
Background technology
VCard is called the ecommerce card, is mainly used in the thin associated person information of record communication etc., the exchanges data between the aspect distinct device.The vCard standard is allowed open exchange personal data exchange message, can find these information at the traditionally on paper business card.The form of normalized definition electronic business card, the vCard standard can be used as the DIF between various application or the system.The form of definition and the method for transmission are irrelevant.Transmitting exchange possibly be file system, and the public telephone network of point-to-point exchange is with the mode of cable network or wireless transmission.The user can directly utilize vCard on the internet.Email can be transmitted people's information in vCard.The form that a lot of users fill on the webpage can use vCard automatically.
Present mobile phone terminal major part when importing be the regular coding form or according to file in the coded format indicated import the vCard file.These methods have following defectives: the vCard file that the first, does not write coded format for some; Because neither one 100% can be guessed the method for its coded format right at present; If not in the conjecture; The problem of contact person's mess code that can cause importing, thus complaint and the complaint of user produced to our mobile phone brand, may damage our brand image; If second goes to guess coded format by software, can reduce the efficient of importing so to a certain extent, prolonged user's stand-by period.
Summary of the invention
The objective of the invention is to overcome the deficiency of prior art, provide a kind of vCard of avoiding to import the method that produces mess code, improved the efficient and the accuracy rate that import vCard, saved period of reservation of number.
In order to achieve the above object, the technical scheme that the present invention adopts is, a kind of vCard that avoids imports the method that produces mess code, and its step is following:
Step 1, beginning vCard file import;
Step 2, the vCard file is carried out coded format inspection;
Step 3, judge whether the vCard file comprises coded format;
Step 4, comprise coded format and then use the coded format in the vCard file, no coded format then user is selected coded format;
Step 5, parsing vCard file;
Step 6, end import the vCard file.
No coded format described in the above-mentioned steps 4 then user selects the step of coded format following:
Step 4.1, ejection supply the user to select the dialog box of coded format;
Step 4.2, dialog box are listed common coded format;
Step 4.3, user select coded format.
Common coded format described in the above-mentioned steps 4.2 comprises UTF-8, UTF-16, UTF-32, GBK and other common coded formats.Described coded format GBK is in particular GB2312.
The step of resolving the vCard file in the above-mentioned steps 5 is following:
Step 5.1, begin to resolve the vCard file;
Step 5.2, run into BEGIN:VCARD in the document flow;
Step 5.3, read the file next line, whether run into END:VCARD;
Step 5.4, do not run into END:VCARD and then read this delegation, and judge the document flow that reads,
Read TEL and then the content of this row back is read as number, and execution in step 5.3;
Read EMAIL and then the content of this row back is read as mail, and execution in step 5.3;
Read ADR and then the content of this row back is read as the address, and execution in step 5.3;
Read URL and then the content of this row back is read as the website, and execution in step 5.3;
Reading PHOTO is bitmap with the content encoding of this row back then, and execution in step 5.3;
Read other some vCard standard attributes, then the content with this row back is read as corresponding content, and execution in step 5.3;
Run into END:VCARD and judge then whether read file finishes;
Step 5.5, be then to finish to resolve the vCard file, otherwise continue to resolve the vCard file.
Described in the above-mentioned steps 5.4 is number attribute in the vCard standard; EMAIL is mail attribute in the vCard standard, and ADR is address attribute in the vCard standard, and URL is an attribute in the vCard standard; PHOTO is picture attribute in the vCard standard; Other for example be organized as ORG, TITLE is a post, N is a name etc.
Compared with prior art; The invention has the beneficial effects as follows: the first, let the user go decision acquiescence coded format; When running into the file of some vCard that do not write coded format, the coded format that can use the user to select removes to resolve this vCard file, reduces the probability that mess code occurs; The second, let the user go to select coded format, can save the time of conjecture coded format, improve the efficient that imports; Three, when occurring importing the mess code problem, the user can attempt the different coding form and go to import, and makes the importing contact person that the user finally can be correct to import again and go that without the user vCard file is done some conversion work.
Description of drawings
Fig. 1 is a method flow diagram of the present invention;
Fig. 2 is the method flow diagram of parsing vCard file of the present invention.
Embodiment
Purport of the present invention is to overcome the deficiency of prior art, provides a kind of vCard of avoiding to import the method that produces mess code, has improved the efficient and the accuracy rate that import vCard, has saved period of reservation of number.Let the user go decision acquiescence coded format, reduce the probability that mess code occurs; Let the user go to select coded format, can save the time of conjecture coded format, improve the efficient that imports; When occurring importing the mess code problem, the user can attempt the different coding form and go to import, and makes the importing contact person that the user finally can be correct to import again and go that without the user vCard file is done some conversion work.
Be elaborated with reference to accompanying drawing below in conjunction with embodiment, so that technical characterictic of the present invention and advantage are carried out more deep annotation.
Method flow diagram of the present invention is as shown in Figure 1, and a kind of vCard that avoids imports the method that produces mess code, and its step is following:
Step 1, beginning vCard file import;
Step 2, the vCard file is carried out coded format inspection;
Step 3, judge whether the vCard file comprises coded format;
Step 4, comprise coded format and then use the coded format in the vCard file, no coded format then user is selected coded format;
Step 5, parsing vCard file;
Step 6, end import the vCard file.
No coded format described in the above-mentioned steps 4 then user selects the step of coded format following:
Step 4.1, ejection supply the user to select the dialog box of coded format;
Step 4.2, dialog box are listed common coded format;
Step 4.3, user select coded format.
Common coded format described in the above-mentioned steps 4.2 comprises UTF-8, UTF-16, UTF-32, GBK and other common coded formats.Described coded format GBK is in particular GB2312.
The method flow diagram of the parsing vCard file in the above-mentioned steps 5 is shown in Fig. 2, and step is following:
Step 5.1, begin to resolve the vCard file;
Step 5.2, run into BEGIN:VCARD in the document flow;
Step 5.3, read the file next line, whether run into END:VCARD;
Step 5.4, do not run into END:VCARD and then read this delegation, and judge the document flow that reads,
Read TEL and then the content of this row back is read as number, and execution in step 5.3;
Read EMAIL and then the content of this row back is read as mail, and execution in step 5.3;
Read ADR and then the content of this row back is read as the address, and execution in step 5.3;
Read URL and then the content of this row back is read as the website, and execution in step 5.3;
Reading PHOTO is bitmap with the content encoding of this row back then, and execution in step 5.3;
Read other some vCard standard attributes, then the content with this row back is read as corresponding content, and execution in step 5.3;
Run into END:VCARD and judge then whether read file finishes;
Step 5.5, be then to finish to resolve the vCard file, otherwise continue to resolve the vCard file.
TEL described in the above-mentioned steps 5.4 is number attribute in the vCard standard; EMAIL is mail attribute in the vCard standard, and ADR is address attribute in the vCard standard, and URL is an attribute in the vCard standard; PHOTO is picture attribute in the vCard standard; Other for example be organized as ORG, TITLE is a post, N is a name etc.
UTF-8 is that a kind of elongated character code of UNICODE is claimed ten thousand country codes again, and UTF-8 is with 1 to 6 byte code UNICODE character, through being usually used in website or some forums, because this coded format can be saved the space.
UTF-16 is one of them coded system of Unicode.UTF is Unicode Translation Format, i.e. Unicode text formatting.UTF-16 is compared with UTF-8, and benefit is that most of character all stores with the byte (2 byte) of regular length, but UTF-16 can't be compatible with the ASCII coding.That give tacit consent among the c# is exactly UTF-16, so when handling the c# character string, can only be byte, modes such as stream go to handle.
UTF-32 is a kind of with the character-coded agreement of Unicode, and lucky 32 bits are used in each Unicode sign indicating number position.Other Unicode transformation formats then uses the indefinite length coding.Because UTF-32 uses 4 bytes to each character, with regard to the space, be very inefficent.Especially, the character of non-basic multilingual plane is very rare usually in most of file, to such an extent as to they are considered to not exist the big or small discussion that takes up room usually, makes that UTF-32 can be 2~4 times of other coding usually.
GBK is the Chinese international extended code, has adopted all Chinese characters of original GB2312-80 and sign indicating number position basically, and has contained Chinese character all among the former Unicode 20902, has included 883 symbols altogether, 21003 Chinese characters and 1894 coinage sign indicating number positions are provided.The Chinese Windows 95 of the simplified version of Microsoft is an ISN with GBK exactly, again because GBK has also been contained all CJK Chinese characters of Unicode simultaneously, so also can do corresponding one by one with Unicode.
The process that starts mobile phone importing vCard file is following: during beginning; At first import the vCard file, program begins to check the coded format of vCard file, judges whether comprise coded format in the file; Exist coded format then to use the coded format in the vCard file; Do not exist coded format then to eject dialog box and supply the user to select coded format, in dialog box, list common coded format, like UTF-8, UTF-16, UTF-32, GB2312 and other common character set.After the coded format that the user need therefrom to select, the vCard file is resolved, finish to import the vCard file.
Although the method for generation mess code had been made the clear description of accomplishing when the present invention imported how avoiding the vCard file through instantiation; But the present invention is not limited only to said embodiment, and to reach identical purpose be contingent and all be included in the present invention through simple reprogramming.

Claims (6)

1. avoid vCard to import the method that produces mess code for one kind, its step is following:
Step 1, beginning vCard file import;
Step 2, the vCard file is carried out coded format inspection;
Step 3, judge whether the vCard file comprises coded format;
Step 4, comprise coded format and then use the coded format in the vCard file, no coded format then user is selected coded format;
Step 5, parsing vCard file;
Step 6, end import the vCard file.
2. a kind of vCard that avoids according to claim 1 imports the method that produces mess code, it is characterized in that the no coded format described in the above-mentioned steps 4 then user selects the step of coded format following:
Step 4.1, ejection supply the user to select the dialog box of coded format;
Step 4.2, dialog box are listed common coded format;
Step 4.3, user select coded format.
3. a kind of vCard that avoids according to claim 2 imports the method that produces mess code, and it is characterized in that: the common coded format described in the above-mentioned steps 4.2 comprises UTF-8, UTF-16, UTF-32 and GBK.
4. a kind of vCard that avoids according to claim 3 imports the method that produces mess code, and it is characterized in that: described coded format GBK is in particular GB2312.
5. a kind of vCard that avoids according to claim 4 imports the method that produces mess code, it is characterized in that the step of the parsing vCard file described in the step 5 is following:
Step 5.1, begin to resolve the vCard file;
Step 5.2, run into BEGIN:VCARD in the document flow;
Step 5.3, read the file next line, whether run into END:VCARD;
Step 5.4, do not run into END:VCARD and then read this delegation, and judge the document flow that reads,
Read TEL and then the content of this row back is read as number, and execution in step 5.3;
Read EMAIL and then the content of this row back is read as mail, and execution in step 5.3;
Read ADR and then the content of this row back is read as the address, and execution in step 5.3;
Read URL and then the content of this row back is read as the website, and execution in step 5.3;
Reading PHOTO is bitmap with the content encoding of this row back then, and execution in step 5.3;
Read other some vCard standard attributes, then the content with this row back is read as corresponding content, and execution in step 5.3;
Run into END:VCARD and judge then whether read file finishes;
Step 5.5, be then to finish to resolve the vCard file, otherwise continue to resolve the vCard file.
6. a kind of vCard that avoids according to claim 5 imports the method that produces mess code; It is characterized in that: the TEL described in the step 5.4 is number attribute in the vCard standard; EMAIL is mail attribute in the vCard standard; ADR is address attribute in the vCard standard, and URL is an attribute in the vCard standard, and PHOTO is picture attribute in the vCard standard.
CN2011101806914A 2011-06-30 2011-06-30 Method for avoiding messy codes caused by import of vCard Pending CN102385572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101806914A CN102385572A (en) 2011-06-30 2011-06-30 Method for avoiding messy codes caused by import of vCard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101806914A CN102385572A (en) 2011-06-30 2011-06-30 Method for avoiding messy codes caused by import of vCard

Publications (1)

Publication Number Publication Date
CN102385572A true CN102385572A (en) 2012-03-21

Family

ID=45824993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101806914A Pending CN102385572A (en) 2011-06-30 2011-06-30 Method for avoiding messy codes caused by import of vCard

Country Status (1)

Country Link
CN (1) CN102385572A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105988977A (en) * 2015-02-16 2016-10-05 珠海金山办公软件有限公司 Character code identification result display method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050233697A1 (en) * 2004-04-19 2005-10-20 Samsung Electronics Co., Ltd. Method for management of vCards
CN101140517A (en) * 2007-10-23 2008-03-12 中兴通讯股份有限公司 Method and device for realizing business card holder Vcard format in PC software
CN101335720A (en) * 2007-06-27 2008-12-31 潘广和 Device and method for acquiring newest contact information by e-mail signature

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050233697A1 (en) * 2004-04-19 2005-10-20 Samsung Electronics Co., Ltd. Method for management of vCards
CN101335720A (en) * 2007-06-27 2008-12-31 潘广和 Device and method for acquiring newest contact information by e-mail signature
CN101140517A (en) * 2007-10-23 2008-03-12 中兴通讯股份有限公司 Method and device for realizing business card holder Vcard format in PC software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马以辉: "《一级MS Office考点详解、分类题解析与单元强化训练》", 31 January 2006 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105988977A (en) * 2015-02-16 2016-10-05 珠海金山办公软件有限公司 Character code identification result display method and apparatus

Similar Documents

Publication Publication Date Title
EP2814212B1 (en) Method and apparatus for adding friend, and storage medium
US9022280B2 (en) Multi-mode barcode resolution system
US10243889B2 (en) Keyword based automatic reply generation in a messaging application
US20140280652A1 (en) Method and device for posting microblog message
CN103853806A (en) Method and device for converting table
CN101364216B (en) Method and device for displaying electronic book documentary on mobile terminal
CN104142964A (en) Information matching method and device
CN103020152B (en) Social network information stream display method and mobile terminal
CN109388713A (en) A kind of intelligent processing method and device of unread short messages
US8473280B2 (en) System and methods for cost-effective bilingual texting
CN106937004A (en) A kind of method for clearing up ageing short message automatically, device and mobile terminal
CN101098498A (en) Method for receiving, transmitting and displaying length-increased short message
CN103150172A (en) Method and equipment for realizing individual scene
CN101119545B (en) Encoding label based information processing system and information processing method
CN104077323A (en) Method and device for converting web page content to multimedia messages
US8244871B2 (en) Mobile communications device capable of replying to advertising message and method thereof
CN102385572A (en) Method for avoiding messy codes caused by import of vCard
CN101808110B (en) Forum access method based on mobile communication equipment terminal
CN102130997B (en) Message transmitting method and device
CN104104580A (en) Group information processing method, group information system and correlation apparatus
CN103885988B (en) Export method and device, the content output system of content
CN116303888A (en) Rarely used word processing method and device, storage medium and electronic equipment
CN102790951B (en) A kind of data inputting method of mobile terminal, system and mobile terminal
CN102404292A (en) Method and system for account automatic matching
CN101072195B (en) Method and system for displaying mail content

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120321