CN101763408B - Method for decoding txt file and device thereof, as well as electronic product comprising device - Google Patents
Method for decoding txt file and device thereof, as well as electronic product comprising device Download PDFInfo
- Publication number
- CN101763408B CN101763408B CN2009102301642A CN200910230164A CN101763408B CN 101763408 B CN101763408 B CN 101763408B CN 2009102301642 A CN2009102301642 A CN 2009102301642A CN 200910230164 A CN200910230164 A CN 200910230164A CN 101763408 B CN101763408 B CN 101763408B
- Authority
- CN
- China
- Prior art keywords
- files
- blocks
- decoding
- txt file
- content
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000012545 processing Methods 0.000 claims description 19
- 238000004321 preservation Methods 0.000 claims description 2
- 238000004458 analytical method Methods 0.000 abstract description 3
- 239000012634 fragment Substances 0.000 description 19
- 239000000047 product Substances 0.000 description 18
- 230000008569 process Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 230000000875 corresponding effect Effects 0.000 description 8
- 230000008859 change Effects 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 239000000203 mixture Substances 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000012467 final product Substances 0.000 description 2
- 238000005096 rolling process Methods 0.000 description 2
- 210000000538 tail Anatomy 0.000 description 2
- 208000004350 Strabismus Diseases 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000007373 indentation Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000000153 supplemental effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007306 turnover Effects 0.000 description 1
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The invention discloses a method for decoding a txt file and a device thereof as well as an electronic product comprising the device. The method comprises the following steps of: virtually dividing a txt file into a plurality of file blocks according to a set macro-value; sequentially loading the file blocks in a decoding sequence and decoding the contents of the file blocks. The invention solves the problem of size limitation of the txt file in decoding and simultaneously carries out self-adaptive coding analysis and self-adaptive typesetting function on a target file without improving any hardware cost.
Description
Technical field
The present invention relates to a kind of coding/decoding method and device thereof, especially a kind of coding/decoding method of txt file and device thereof.
Background technology
The active user is increasingly high for the txt file decoding request, and especially the low and middle-end portable electronic products is because restrictions such as memory size often have the file size restriction to the txt file of operation.
On the one hand, the restriction that surpasses portable electronic products hardware then can't be decoded to txt file, and needing the user to cut into a plurality of files voluntarily could decode respectively, and this has caused inconvenience for user's use; On the other hand, under the background that the current information amount is increased sharply, the capacity of txt file is increasing, and the quantity of information that comprises is more and more, and is more and more urgent for the decoding request of this type high capacity file.Therefore, traditional txt file coding/decoding method and decoding device thereof can't satisfy current and user's basic demand from now on.
In addition, the txt file of different system's generations also has difference.Current is main with Windows system, apple Mac system and linux system mainly, and the text character storage rule of its generation is all inequality, the problem that this can not fully discern and decode when having caused txt file between different system platform, to transplant.
Generally speaking, some problems below the main existence of existing txt file decoding:
1, there is restriction in the size of file destination, or to the problem that waits more slowly of opening of high capacity file.
2, to the incomplete parsing of various codings and different platform text file format.
Therefore, need the problems referred to above of existing in a kind of coding/decoding method and the decoding of device thereof of new txt file with better solution portable electronic products txt file.
Summary of the invention
In view of this, the present invention is devoted to better to solve the problems referred to above that exist in the decoding of portable electronic products txt file, has proposed a kind of coding/decoding method and device thereof of txt file and has comprised the electronic product of this device.
A kind of coding/decoding method of txt file is provided according to a first aspect of the invention.This method also comprises the steps:
Step a: the grand value according to setting is virtually divided into several blocks of files to txt file;
Step b: the order of decoding as required is written into blocks of files successively and the content of said blocks of files is decoded.
Said method also comprises step c after step b:
Decoded blocks of files is carried out paging handle, and its page table information is preserved.
Among the above-mentioned steps c decoded blocks of files is carried out also comprising the steps: before paging is handled
Step c1: take out decoded blocks of files, and the content of blocks of files is converted into the Unicode character;
Step c2: when in the Unicode of blocks of files character, detecting CR or LF, all carry out branch and handle.
The type of coding of above-mentioned txt file comprises one or more in following several kinds:
GB2312/GBK、unicode、uincode-BE、utf-8。
Above-mentioned blocks of files adopts the thread mode to handle, and accomplishes decoding and/or paging and preservation back at it and finish thread.
A kind of decoding device of txt file is provided according to a second aspect of the invention.This decoding device comprises:
The blocks of files processing module: the grand value according to setting is virtually divided into several blocks of files with txt file;
The Context resolution module: the order of decoding as required is written into the blocks of files of blocks of files processing module output successively and the content of blocks of files is decoded.
Above-mentioned decoding device also comprises content paging module: the decoded blocks of files of content parsing module is carried out paging handle and its page table information is preserved.
Foregoing paging module also comprises following processing:
Take out decoded blocks of files, and the content of blocks of files is converted into the Unicode character;
When in the Unicode of blocks of files character, detecting CR or LF, all carry out branch and handle.
According to a third aspect of the invention we, a kind of electronic product also is provided.This electronic product comprises described each decoding device of second aspect present invention.
Above-mentioned electronic product is mobile phone, electronic dictionary, PDA, MP3 and MP4.
The invention has the beneficial effects as follows:
The present invention is directed to the decoding of the txt file that has existed, further solved the size restriction of text, simultaneously file destination has been carried out self-adaptive coding analysis, do not increase any hardware cost.
Description of drawings
Below with reference to accompanying drawings specific embodiments of the present invention is explained in more detail, wherein:
Fig. 1 is a blocks of files bulk treatment process flow diagram of the present invention;
Fig. 2 is an adaptive decoding process flow diagram of the present invention;
Fig. 3 is a text composition process flow diagram of the present invention;
Fig. 4 is that display position of the present invention moves synoptic diagram;
Fig. 5 is that display position of the present invention moves process flow diagram;
Fig. 6 is the first example structure figure of decoding device of the present invention; And
Fig. 7 is the second example structure figure of decoding device of the present invention.
Embodiment
For the problem of capacity in the decoding that solves txt file and decoding speed, the invention provides a kind of coding/decoding method and device thereof of txt file and comprise the electronic product of this device.
Technical term of the present invention once at first is described.
Blocks of files: file is divided into the file fragment that the big or small fragment of setting is analyzed, just only carries out virtual piecemeal, do not change the size and the structure of original.
Virtual paging: carry out paging by the maximum number of lines of setting that can show at every turn, and preserve corresponding page information, not necessarily identical with the page or leaf of actual displayed.
Cache: read behind the file fragment the page table information stores in this fragment in the space of distributing in advance, this section program life cycle is defined as Cache as the memory block of fast reading and writing all the time at every turn.
Next, divide a plurality of little coding/decoding method and devices thereof that specify txt file in conjunction with each accompanying drawing, wherein, concrete function and operation are all with pseudo-representation.
Fig. 1 illustrates blocks of files bulk treatment process flow diagram of the present invention, and is as shown in Figure 1, and step 100 beginning is read document size information and begun, file_size=Getfilesize ().
In the step 102, according to the grand value Fragment_size of definition, the quantity of analytical calculation blocks of files, Frags=file_size/Fragment_size+1.
In the step 104, create thread Creat_thread, and initialization thread Init_thread, with the content Thread_start of beginning Study document piece.
In the step 106, begin to read a blocks of files from the default bias amount, start_position is the offset parameter of definition, then Read_block (start_position).
In the step 108, analyze this document piece content, promptly content of text is decoded; Carry out paging then, handle function Block_pagescale () by paging and handle, and memory page table information is promptly preserved by Block-offset_recite () to global variable.Wherein, page table information comprises page or leaf beginning side-play amount and page length degree.And finally accomplish paging by Finish_pagingscale () function.
In the step 110, after the blocks of files analysis finishes, and page table information also is ready to an event notice upper strata preparation demonstration, SendEvent ().
In the step 112, discharge thread behind completion this document block operations, i.e. Release_thread ().
But the coding/decoding method by last knowledge capital invention txt file comprises the steps: basically
Step a: the grand value (its size can be 1K-1M, mainly decides according to the situation of hardware) according to setting is virtually divided into several blocks of files to txt file.
Step b: the order of decoding as required is written into blocks of files successively and the content of said blocks of files is decoded.
To hardware file size is had the situation of respective limits, reaching decoding speed simultaneously again need be irrelevant with file size, so according to the difference of usage platform, can define the grand value that reads blocks of files at every turn.Different portable electronic products can be provided with the size of grand value according to the software and hardware configuration of self.
To the characteristics of different platform, can use thread to operate when reading, the circulation that avoids the use of the long period causes overtime cause unusual of other tasks of bottom at every turn.
Each content of resolving corresponding text fragments; Needing that this section content is carried out virtual paging handles; And every initial absolute position is stored among the cache, so that need not to resolve again once more when reading at every turn, and minimize cache amount of capacity demand to portable electronic products.
Fig. 2 illustrates adaptive decoding process flow diagram of the present invention, and is as shown in Figure 2, and the blocks of files content is read in step 200 beginning, and returns to pointer to the content of reading.Definition pointer Pcontent makes Pcontent=Read_block (start_position).
In the step 202, begin to read the blocks of files content from blocks of files beginning side-play amount, to decode.
In the step 204; Judge coded format and decode according to coded format; Judge that promptly the coded format function judges Ntype=Get_codingtype (Pcontent), then by decoding functions decode Ret=Coding_convention (Ntype, Pcontent); Also promptly carry out transcoding and convert unified sign indicating number type to, the present invention adopts the unicode sign indicating number.
In the step 206, further the sign indicating number after the conversion is carried out byte and judge, promptly Chars_judgement (Ret) if in byte is judged, run into short in size, then gets in the step 208, returns error message error; If in byte is judged, do not run into short in size, then get in the step 212, return success information, explain that whole section is resolved successfully, continue paging and handle.
After step 208, get into step 210, carry out secondary and resolve from the parsing byte that squints forward backward, also be that the Pcontent pointer adds 1 or subtract 1 automatically, return then in the step 204, resolve again, and carry out subsequent step.
To the difference of text coded system, need carry out a yard transfer process in the time of need decoding to each fragment, because domestic coded system commonly used has GB2312/GBK; Unicode; Uincode-BE, utf-8 etc. have nothing in common with each other to the coded format that contains non-ascii character.
Owing to adopt unicode; The file of unicode-BE and utf-8 coded system has corresponding marker bit at top of file (being several bytes that file begins most); So can carry out the judgement of coded format according to the corresponding contents that file header reads, transform accordingly as required then.
Yet the text for preserving with the GB2312/GBK coded system does not have a corresponding file zone bit, so need the in addition control and the judgement of code value for the parsing of reading of content.Especially the function for redirect arbitrarily causes the short in size problem probably; Be that (for example: " " is " D6D0 " (being 16 systems representes) at the GB sign indicating number through two byte representations to fragment reference position after the redirect low level that just in time is arranged in a Chinese character coding; Here the meaning of being explained is just missed a byte " D6 " of its front for being read as D0 just), thus the code value that causes the back literary composition all misplaces; Therefore caused the short in size problem, showed and be the mess code demonstration.
To above-mentioned encoded question, the present invention has carried out adaptive fine setting decoding after reading the arbitrary text fragment.
Coding rule according to the GB sign indicating number can know that the ASCII character value adopts byte to represent, NON-ASCII characters such as Chinese character adopt the double byte sign, and double byte has certain rule: the upper byte scope is 80-FE, and the low byte scope is 40-FE.
Interspersed problem based on the character of two types of code lengths in the text (is that plain text must have ascii characters such as punctuation mark in addition; Like newline etc.; If or do not have corresponding symbol then all the elements have all become the double-byte encodings text; Tightly need to judge whether side-play amount is that even number gets final product), when decoding, can carry out multiple possibility according to former and later two bytes that read the position fully and judge.If can't judge, then can read certain content up to running into corresponding ascii character backward, promptly can determine whether decoding error, if it is wrong to decode, then explanation runs into short in size.Tightly need with reference position backward or the byte that moves forward can solve current short in size problem.
The present invention selects to adopt the byte that moves forward in order to realize the seamless connection of text, then institute's reading of content and last fragment is carried out seamless connection.
Above-mentioned decode procedure carries out paging reading a certain blocks of files, has adopted the design of thread, so can well control the Variable Control problem of having avoided segmentation timesharing circulation to cause for the flexible redirect in handling.
Next, just branch is treated to the processing procedure that main explanation technical scheme Chinese words of the present invention is set type.
Fig. 3 illustrates text composition process flow diagram of the present invention; As shown in Figure 3, step 300 beginning is taken out content of pages through page table information; After page table information such as clear and definite start of Page position Page_start and page or leaf number of characters Page_char_num; Just can obtain content of pages through content pointers, promptly Pcontent=Read_content (Page_start, Page_char_num).
In the step 302, page coding is converted into Unicode character Unified Treatment, promptly by transcoding function PUnicode=code_convertion (Pcontent, Ntype).
In the step 304, branch handles beginning, initialization row chained list, Plink=Init-link ().
In the step 306, page character is judged, when detecting CR or LF; Get in the step 308, carry out automatic branch as one section, and can whether begin the place as required and carry out character skew (being usually said first trip indentation pattern) at paragraph; Its concrete operations are to join this section character in the capable chained list; Its content comprises target chained list, start of line address and row byte number, i.e. Add_link (Plink, line_start; Line_cnt), return then and handle and carry out subsequent step in the step 306 again.
In the step 306, when not detecting CR or LF, get in the step 310, judge whether to detect ending, and only should judge and to judge once at page afterbody.
In the step 312, branch finishes, and promptly Finish_scale (Plink) sends the Plink pointer to global variable simultaneously.
In the step 314, this page row chained list is set up and is finished, and sends out the event notice upper strata and shows, be i.e. SendEvent ().
Show to be provided with and handle that so full frame or non-full frame freely switches and change requirement such as font style size for what move that portable electronic products often adopts, the composing problem of literal is the comparison key owing to the present invention is directed to flexibly.
Fully take into account the text character storage rule difference that different pc platforms adopt during composing.Carry out self-adaptive processing targetedly, mainly be meant the expression that row switches.The text of windows platform adopts " CR+LF ", and the only use " CR " of apple Mac system, and (SuSE) Linux OS adopts " LF " so need unify when resolving text and realize abundant self-adaptation to the line feed form that different system generates text.
Simultaneously; For better demonstration; Adopted chained list that each row content that portable electronic products need show is remembered; Be similar to the page table information processing, the relevant treatment that shows so just can conveniently freely be switched and carried out other variations to reading model and operate specific to row in reading process.
The function realization that is similar to " line feed automatically " in the pc end Chinese version reader is handled in technical scheme Chinese words composing of the present invention; Make text can be directed against current screen width complete being shown in the screen automatically; Removed the not congruent problem of the long demonstration that causes of paragraph from, or the operation that needs scroll bar to drag.
And to the conversion of font, only need in the character string measurement functions, change font size to get final product, therefore, accomplished decorrelationization fully to font size in the paging process.
Fig. 4 illustrates display position of the present invention and moves synoptic diagram, and is as shown in Figure 4, and the black surround window is the current content of text that is presented at screen, and three show that fragment is respectively three text messages that once are written into internal memory.
Here the line displacement amount information after the only in store branch is not that blocks of files content with reality is written into; When each up-downgoing rolling or page turning current shade window is moved forwards, backwards.
The above-mentioned mobile two kinds of move modes that comprise:
Demonstration between the page in the one of which, blocks of files is moved;
Its two, the demonstration of the page is moved between the blocks of files.
Be referred to as the demonstration fragment at this, that is to say to show that fragment can be the different blocks of files of representative, also can represent the different pages in the blocks of files.
Next the handoff procedure that shows fragment is described on the whole:
When the shade window moved to last figure state, promptly the reference position of shade window need show that fragment switches not when internal expression text shows fragment interior.
Specifically, need a frag info be discharged, and after the cauda section, replenish the message sense of next fragment, and the protocercal tail fragment is changed to intermediate segment, former intermediate segment is changed to a fragment, and the new run-out that adds is changed to the cauda section.So just guaranteed that each displaying contents all locates with intermediate segment overlapping information to be arranged, promptly whole process is in the state of context non-NULL all the time.
Above-mentioned processing is actual to be in order to guarantee each page turning or to turn over action when do carrying out, can directly reading down the capable information that one page needs displaying contents.
The problem that occurs mess code when so also having avoided in the traditional operation being forward page turning or tilted forward row easily for rolling forward after the fragment decoding.Because the numerous coded systems for the NON-ASCII character are inconsistent with the code length of ASCII mostly, occur the short in size problem that the coding error in judgement causes when therefore reading content of text forward easily, thereby cause corresponding mess code problem.
Fig. 5 illustrates display position of the present invention and moves process flow diagram, and is as shown in Figure 5, this processing procedure of more complete signal.
At first, define three buffer, be respectively:
M_pPrev (representing the text among the Part I);
M_pMiddle (representing the text among the Part II);
M_pNext (representing the text among the Part III);
And row chained list: Link*m_LineLink, m_pCurrentNode.
Have in the Link node:
1, the pointer reference position-pText of this this content of style of writing;
2, capable the byte number---nLength of this row.
Suppose that every page of line number that can show of current portable electronic products is LINE_PER_PAGE; And
The handling function unification that Link is relevant starts with Link_.
Several important process processes of this part are:
A、
nCurrentCnt=Link_GetCount(&m_LineLink);
Obtain the line number in the current chained list;
B、
If the content in the current chained list is three pages (suppose the current text stage casing that is in, be not shown to afterbody) of reality inadequately, need supplemental content.
If(nCurrentCnt<2*LINE_PER_PAGE)
{
Uint16?nPageOffset,nPageCnt;
// definition temporary variable is so that obtain the start offset position and the number of characters of page or leaf
Link*pNewPageLink;
// newly be written into the capable information pointer of the page
GetNextPageInfo(&nPageOffset,&nPageCnt);
// obtain down start offset position and the contained number of characters of this page or leaf of one page content
pNewPageLink=PageLoad(m_pNext,nPageOffset,nPageCnt);
// will descend one page content to be written into, and this page row information content formation chained list is returned
Link_Add(&m_LineLink,pNewPageLink);
// add the capable chained list of the current new page or leaf of obtaining to overall chained list afterbody
}
C、
With establishing reference position that current page shows shown in Fig. 4 a, and node that this reference position is expert at is m_pCurrentNode.
If existing page turning backward, then the page location state can become Fig. 4 b:
Can see; Following one page content temporarily can't show fully; Event need partly discharge PartI before page turning, and Part II and Part III moved forward in order is Part I and Part II, is being written into one page down at last; It is added in the chained list, and the correlated variables content is set to suitable current location.
Idiographic flow is following:
If(FALSE==JudgeLinkLeft(&m_LineLink,m_pCurrentNode))
{
FreeHeadPart(&m_LineLink,LINE_PER_PAGE)
// node of part I part in the chained list is discharged
Free_Buffer(m_pPrev)
// content pointers of Part I part is discharged
MoveBuffer_To_Left(m_pPrev,m_pMiddle,m_pNext)
// the buffer area pointer moves to left
// be written into down one page detailed process and see the B part
}
m_pCurrentNode=LinkGetNext(&m_LineLink,LINE_PER_PAGE)
// move the node number of one page line number from present node backward, obtain down the node location that one page begins to show
Display(&m_LineLink,m_pCurrentNode)
// beginning to show one page content down from pCurrentNode indication position, concrete Display function is realized analyzing.
Fig. 6 illustrates the first example structure figure of decoding device of the present invention, and as shown in Figure 6, this reader comprises: blocks of files processing module, Context resolution module.
The blocks of files processing module is virtually divided into several blocks of files according to the grand value of setting with txt file.
The order that the Context resolution module is decoded as required is written into the blocks of files of blocks of files processing module output successively and the content of blocks of files is decoded.
Fig. 7 illustrates the second example structure figure of decoding device of the present invention, and as shown in Figure 7, this reader comprises: blocks of files processing module, Context resolution module and content paging module.
The blocks of files processing module is virtually divided into several blocks of files according to the grand value of setting with txt file.
The order that the Context resolution module is decoded as required is written into the blocks of files of blocks of files processing module output successively and the content of blocks of files is decoded.
Content paging module is carried out paging to the decoded blocks of files of content parsing module and is handled and its page table information is preserved.
Foregoing paging module also comprises following processing:
Take out decoded blocks of files, and the content of blocks of files is converted into the Unicode character;
When in the Unicode of blocks of files character, detecting CR or LF, all carry out branch and handle.
More than the Context resolution module of two embodiment to the decoding of blocks of files, through at first judging its coding rule, decode targetedly then, its disposal route is with the processing procedure of above-mentioned coding/decoding method.
More and more frequent to txt text application in the current portable electronic products (comprising mobile phone, electronic dictionary, PDA, MP3 and MP4 etc.); And the continuous increase of current information amount; In present portable electronic products based on different platform; Especially the low and middle-end mobile phone is more for text decoding restriction, and function is perfect inadequately; The traditional mode of setting type current application demand of incompatibility that directly is written into and decodes, and support perfect inadequately to user's variation operation.This technology will solve portable electronic products to the restriction of the amount of capacity in the text decoding, and support as self-adaptation, the Automatic Optimal of various coded formats are set type and operations such as redirect arbitrarily, page turning.
To the problems referred to above, this technical design is based on limited target file size not, and opening speed is pair irrelevant with file size simultaneously; And support requirements such as the demonstration of Suresh Kumar and composings; Carried out the innovation of Processing Structure, realized, supported character library to switch font size according to interrupting such as parsing and composing function to any txt text; Basic functions such as change font color and background color are also supported the variation operation of user to browsing file simultaneously.
More than specific descriptions of the present invention are intended to explain the implementation of specific embodiments can not be interpreted as it is limitation of the present invention.Those of ordinary skills can make various variants on the basis of the embodiment that details under instruction of the present invention, these variants all should be included within the design of the present invention.The present invention's scope required for protection is only limited by described claims.
Claims (10)
1. the coding/decoding method of a txt file comprises the steps:
Step a: the grand value according to setting is virtually divided into several blocks of files to txt file;
Step b: the order of decoding as required is written into blocks of files successively and the content of said blocks of files is decoded.
2. the coding/decoding method of txt file as claimed in claim 1 is characterized in that, after step b, also comprises step c:
Decoded blocks of files is carried out virtual paging, and its page table information is preserved.
3. the coding/decoding method of txt file as claimed in claim 2 is characterized in that, among the said step c decoded blocks of files is carried out also comprising the steps: before the virtual paging
Step c1: take out decoded blocks of files, and the content of blocks of files is converted into the Unicode character;
Step c2: when in the Unicode of blocks of files character, detecting CR or LF, all carry out branch and handle.
4. the coding/decoding method of txt file as claimed in claim 3 is characterized in that, the type of coding of said txt file comprises one or more in following several kinds:
GB2312/GBK、uincode-BE、utf-8。
5. the coding/decoding method of txt file as claimed in claim 4 is characterized in that:
Said blocks of files adopts the thread mode to handle, and accomplishes decoding and/or paging and preservation back at it and finish thread.
6. the decoding device of a txt file comprises:
The blocks of files processing module: the grand value according to setting is virtually divided into several blocks of files with txt file;
The Context resolution module: the order of decoding as required is written into the blocks of files of blocks of files processing module output successively and the content of blocks of files is decoded.
7. the decoding device of txt file as claimed in claim 6 is characterized in that, also comprises content paging module: the decoded blocks of files of content parsing module is carried out paging handle and its page table information is preserved.
8. the decoding device of txt file as claimed in claim 7 is characterized in that, said content paging module also comprises following processing:
Take out decoded blocks of files, and the content of blocks of files is converted into the Unicode character;
When in the Unicode of blocks of files character, detecting CR or LF, all carry out branch and handle.
9. portable type electronic product is characterized in that:
Comprise claim 6 or 7 or 8 described decoding devices.
10. portable type electronic product as claimed in claim 9 is characterized in that:
Said electronic product is mobile phone, electronic dictionary, PDA, MP3 or MP4.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102301642A CN101763408B (en) | 2009-11-19 | 2009-11-19 | Method for decoding txt file and device thereof, as well as electronic product comprising device |
US13/508,390 US20120233187A1 (en) | 2009-11-19 | 2010-04-30 | Method and apparatus for decoding and reading txt file |
PCT/CN2010/000614 WO2011060603A1 (en) | 2009-11-19 | 2010-04-30 | Method and apparatus for decoding and reading txt file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102301642A CN101763408B (en) | 2009-11-19 | 2009-11-19 | Method for decoding txt file and device thereof, as well as electronic product comprising device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101763408A CN101763408A (en) | 2010-06-30 |
CN101763408B true CN101763408B (en) | 2012-08-01 |
Family
ID=42494572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009102301642A Expired - Fee Related CN101763408B (en) | 2009-11-19 | 2009-11-19 | Method for decoding txt file and device thereof, as well as electronic product comprising device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101763408B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314413A (en) * | 2010-07-06 | 2012-01-11 | 上海闻泰电子科技有限公司 | Electronic-book skipping and positioning method for mobile terminal |
CN102799590B (en) * | 2011-05-26 | 2017-02-08 | 安凯(广州)微电子技术有限公司 | Embedded type electronic product word stock as well as word stock generating method and word stock searching method |
KR102063566B1 (en) | 2014-02-23 | 2020-01-09 | 삼성전자주식회사 | Operating Method For Text Message and Electronic Device supporting the same |
WO2017113230A1 (en) * | 2015-12-30 | 2017-07-06 | 深圳配天智能技术研究院有限公司 | String search method and device |
CN106600206B (en) * | 2016-11-07 | 2020-01-24 | 中广核(深圳)辐射监测技术有限公司 | Method for realizing unidirectional transmission of dosage data of nuclear power plant from management network to industrial network |
CN111476002B (en) * | 2020-04-07 | 2021-01-15 | 北京东方金信科技股份有限公司 | Data file coding format conversion method and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008026995A (en) * | 2006-07-18 | 2008-02-07 | Fuji Xerox Co Ltd | Document file processing program, method, and device |
-
2009
- 2009-11-19 CN CN2009102301642A patent/CN101763408B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008026995A (en) * | 2006-07-18 | 2008-02-07 | Fuji Xerox Co Ltd | Document file processing program, method, and device |
Non-Patent Citations (1)
Title |
---|
JP平3-296134A 1991.12.26 |
Also Published As
Publication number | Publication date |
---|---|
CN101763408A (en) | 2010-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101763407B (en) | Txt file reading method based on brew platform and reader thereof | |
CN101763408B (en) | Method for decoding txt file and device thereof, as well as electronic product comprising device | |
JP4017659B2 (en) | Text input font system | |
CN100356372C (en) | Generating method of computer format document and opening method | |
CN101876907B (en) | Multi-language implementation method and device of human-computer interaction interface | |
US7886309B2 (en) | Accessing a platform independent input method editor from an underlying operating system | |
EP2273361A1 (en) | Method and system for updating versions of content stored in a storage device | |
JPH0351021B2 (en) | ||
JP2005346709A (en) | Input of asian language using keyboard | |
WO2015180422A1 (en) | Page layout method and device | |
WO2008071099A1 (en) | Method and system for inputting artistic word/diagram into application program | |
CN106294493A (en) | Realize the method and device of document format conversion | |
CN101963954A (en) | Method and device for displaying words | |
CN100585561C (en) | Method for clipping relocatable ELF files in embedded system | |
US6883007B2 (en) | Meta normalization for text | |
CN105148519A (en) | Character rendering method and system in game program | |
CN102262520A (en) | Test display method based on built-in platform mobile phone and applied device thereof | |
JP4451908B2 (en) | Unicode converter | |
WO2011060603A1 (en) | Method and apparatus for decoding and reading txt file | |
CN105653506B (en) | It is a kind of based on character code conversion GPU in text-processing method and device | |
WO1997010556A1 (en) | Unicode converter | |
WO1997010556A9 (en) | Unicode converter | |
CN104021026A (en) | Language adding method based on Android system | |
CN103870439A (en) | Uyghur Kazak and Kirghiz display method and application | |
CN100485692C (en) | XML data storage system and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120801 |