Character code conversion methods and systems
AssigneeMediatek Inc.
InventorsChien-Ting Chen, Chao-Lung Lee
Life of this patent
Estimating the term…
Abstract
A conversion method converting characters from a source character set to a destination character set. An index table, a key table, and an encoding table are provided. Source character code of a character is divided into a first part and a second part. A head offset and a tail offset are acquired in the index table according to the first part. The second part is searched in the key table based on the head offset and the tail offset. Destination character code of the character is retrieved from the encoding table matching to the searching result.
Claims12
A conversion method converting characters from a source character set to a destination character set, comprising:
- dividing source character code of a character into a first part and a second part, wherein the source character code is character code of the character encoded in the source character set;
- providing an index table, a key table, and an encoding table;
- acquiring a head offset and a tail offset in the index table according to the first part;
- searching the second part in the key table based on the head offset and the tail offset;
- and
- retrieving destination character code of the character matching to the searching result from the encoding table, wherein the destination character code is character code of the character encoded in the destination character set.
A conversion system converting characters from a source character set to a destination character set, comprising:
- a division module, dividing source character code of a character into a first part and a second part, wherein the source character code is character code of the character encoded in the source character set;
- a key table, comprising at least one recording range and each of the recording ranges has a starting address and an end address in the key table;
- an index table, comprising at least one entry and each entry records the starting address of the recording range as the head offset and the end address of the recording range as the tail offset;
- an encoding table, established by setting the destination character set in the positions corresponding to the key table based on the first parts and the second parts;
- an acquisition module, coupled to the division module and the index table, acquiring a head offset and a tail offset in the index table according to the first part;
- a search module, coupled to the division module, the key table, and the acquisition module, searching the second part in the key table based on the head offset and the tail offset;
- and
- a retrieve module, coupled to the encoding table and the search module, retrieving destination character code of the character from the encoding table matching to the searching result, wherein the destination character code is character code of the character encoded in the destination character set.
Dependencies are inferred from the claim text.