CN211710386U - Character printing system - Google Patents

Character printing system Download PDF

Info

Publication number
CN211710386U
CN211710386U CN201921850185.XU CN201921850185U CN211710386U CN 211710386 U CN211710386 U CN 211710386U CN 201921850185 U CN201921850185 U CN 201921850185U CN 211710386 U CN211710386 U CN 211710386U
Authority
CN
China
Prior art keywords
module
data
thermal
decoder
utf
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.)
Active
Application number
CN201921850185.XU
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.)
Shanghai Sunmi Technology Group Co Ltd
Shanghai Sunmi Technology Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co 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 Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN201921850185.XU priority Critical patent/CN211710386U/en
Application granted granted Critical
Publication of CN211710386U publication Critical patent/CN211710386U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model provides a character printing system. The character printing system comprises an upper computer, an encoder and a printing module, wherein the upper computer comprises an encoder adopting a UTF format and is used for encoding characters to be printed to generate encoded data; the thermal printer is communicated with the upper computer in a wired or wireless mode, the thermal printer comprises a decoder, a Unicode word stock, a searching module and a thermal printing module, the decoder receives coded data generated by the upper computer, the decoder decodes the coded data in a UTF format, the searching module refers to the Unicode word stock according to a decoding result to obtain characters needing to be printed, and the thermal printing module is used for printing the characters. The utility model provides a pair of character printing system adopts the Unicode to encode to realize the support of multilingual, guarantee to print correctly.

Description

Character printing system
Technical Field
The utility model relates to a data printing field especially relates to be applied to thermal printer's character printing system.
Background
The thermal printer has the working principle that a semiconductor heating element is arranged on a printing module, and the printing module can print required patterns after heating and contacting thermal printing paper, and the principle of the thermal printer is similar to that of a thermal fax machine. The image is generated by heating to cause a chemical reaction in the film. The chemical reaction of the thermal printer is carried out at a certain temperature. High temperatures accelerate this chemical reaction. When the temperature is lower than 60 ℃, the paper needs to be changed into dark color for a long time, even for several years; and when the temperature is 200 ℃, the reaction is completed within several microseconds.
The application range of the thermal printer is gradually enlarged, and the thermal printer is required to be used for printing orders and tickets in occasions such as supermarkets, merchants, takeaway distribution and banks. Thermal printers sold for different regions generally support printing of only local language characters, English letters and some basic symbols. Thermal printers such as those sold in mainland china, support only simplified chinese, english and symbols; the thermal printer sold in the district of hong Kong and Australia of China only supports traditional Chinese, English and symbols; thermal printers sold in japan only support japanese, english, and symbols. If an attempt is made to print simplified chinese characters on a thermal printer sold in japan, a sequence of scrambled codes is typically printed. The existing thermal printer on the market can not support the printing of multiple languages and characters at the same time.
SUMMERY OF THE UTILITY MODEL
The to-be-solved technical problem of the utility model is to provide a character printing system adopts the Unicode to encode to realize the support of multilingual, guarantee to print correctly.
In order to solve the above technical problems, the present invention provides a character printing system, which comprises,
the upper computer comprises an encoder adopting a UTF format and is used for encoding characters to be printed to generate encoded data;
the thermal printer is communicated with the upper computer in a wired or wireless mode and comprises a decoder, a Unicode word stock, a searching module and a thermal printing module, wherein the decoder receives coded data generated by the upper computer, the decoder decodes the coded data in a UTF format, the searching module refers to the Unicode word stock according to a decoding result to obtain the characters needing to be printed, and the thermal printing module is used for printing the characters.
Optionally, the UTF format is UTF-8, UTF-16, or UTF-32.
Optionally, the thermal printer further includes a dot matrix data generating module, the dot matrix data generating module is connected to the searching module and the thermal printing module, and the dot matrix data generating module is configured to convert the characters to be printed into dot matrix data and send the dot matrix data to the thermal printing module.
Optionally, the character printing system further includes a control module disposed in the thermal printer, the control module is electrically connected to the decoder, the search module and the thermal printing module, and the control module is configured to control the decoder, the search module and the thermal printing module to cooperatively work to print the character.
Optionally, the upper computer includes a data sending module connected to the encoder, the thermal printer includes a data receiving module connected to the decoder, the data sending module corresponds to the data receiving module, the data sending module is configured to send the encoded data, and the data receiving module is configured to receive the encoded data and transmit the encoded data to the decoder.
Optionally, the data sending module and the data receiving module communicate with each other by using a USB or bluetooth protocol.
Optionally, the thermal printer further comprises a display connected to the search module, wherein the display is used for displaying the characters to be printed.
Compared with the prior art, the utility model has the advantages of it is following: realize the support of multiple languages and accurately print various characters and characters.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the principle of the invention. In the drawings:
fig. 1 is a schematic structural diagram of a character printing system according to an embodiment of the present invention.
Wherein the figures include the following reference numerals:
upper computer 110 of character printing system 100
Encoder 111 data transmission module 112
Thermal printer 120 decoder 121
Unicode word stock 122 lookup module 123
Thermal printing module 124 dot matrix data generating module 125
Data receiving module 126
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only examples or embodiments of the application, from which the application can also be applied to other similar scenarios without inventive effort for a person skilled in the art. Unless otherwise apparent from the context, or otherwise indicated, like reference numbers in the figures refer to the same structure or operation.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
It should be noted that the terms "first", "second", and the like are used to define the components, and are only used for convenience of distinguishing the corresponding components, and the terms have no special meanings unless otherwise stated, and therefore, the scope of protection of the present application is not to be construed as being limited. Further, although the terms used in the present application are selected from publicly known and used terms, some of the terms mentioned in the specification of the present application may be selected by the applicant at his or her discretion, the detailed meanings of which are described in relevant parts of the description herein. Further, it is required that the present application is understood not only by the actual terms used but also by the meaning of each term lying within.
Fig. 1 is a schematic structural diagram of a character printing system according to an embodiment of the present invention. As shown, a character printing system 100 includes an upper computer 110 and a thermal printer 120. The host computer generally refers to a computer that can directly issue a control command, and in this embodiment, it can be understood that the host computer 110 issues a print instruction to the thermal printer 120, so that the thermal printer 120 completes a corresponding print task.
Further, the upper computer 110 includes an encoder 111 in UTF format (standard). The encoder 111 encodes characters to be printed to generate encoded data.
The thermal printer 120 communicates with the upper computer 110 by wire or wirelessly. The thermal printer 120 includes a decoder 121, a Unicode word stock 122, a lookup module 123, and a thermal printing module 124. The decoder 121 is configured to receive encoded data generated by the upper computer 110, the decoder 121 decodes the encoded data by using the UTF format, and the decoder 121 corresponds to the encoder 111. The search module 123 refers to the Unicode word stock 122 according to the decoding result of the decoder 121 to obtain (restore) a character to be printed, and the thermal printing module 124 is used to print the character. As will be readily appreciated, the lookup module 123 is electrically connected to the decoder 121, the Unicode word stock 122 and the thermal printing module 124, respectively, to enable the thermal printer 120 to perform the decoding, lookup and printing operations.
The utility model provides a character printing system 100 is applicable to the multilingual, and host computer 110 encodes the character that needs to be printed according to the UTF format, sends to thermal printer 120; the thermal printer 120 finds the corresponding characters in the Unicode word stock 122 according to the corresponding encoding standard, and prints the obtained characters on thermal paper through a thermal printing module 124.
It should be noted that, the common codes for simplified chinese are GB2312 and GB18030, etc.; the traditional Chinese codes include GB18030, GBK and the like; japanese codes include JIS, Shift JIS, EUC-JP, and the like; coding in korean includes KSC5601 and the like. The aforementioned different encoding standards, encoding ranges and contents are different. For example, the code value 0xB0a1 corresponds to "o" in GB2312, but there is no corresponding character in japanese JIS and Shift JIS, and the code value 0xB0a1 corresponds to "o" in korean KSC5601
Figure BDA0002253699410000051
In other words, the same code value corresponds to different characters in different coding standards.
Likewise, languages consisting of letters (e.g., latin, arabic, hebrew, thai, etc.) have one byte sufficient for encoding letters and symbols. These languages use code pages (codepages) to associate the coded values with the letters and symbols. The same code value, the characters obtained with a Latin code page and with a Hebrew code page may also be different.
Conventionally, the print contents generated by the upper computer 110 are encoded according to the encoding standard used by the current region, and then transmitted to the thermal printer 120. Therefore, for different languages or areas with different characters, the thermal printer 120 needs to use different codes, so that the received print data can be correctly parsed into the characters to be printed and printed. If the codes are not correct, the printed content is blank or scrambled. Therefore, it is common that the thermal printers 120 of the same model require different code versions to be installed according to the language of the sales region.
The utility model discloses a Unicode code, it forms the only code with the characters and the symbol of every language. Generally, the Unicode codes are 2-3 bytes, and because the Unicode codes are not suitable for being directly used for communication transmission, a receiver cannot judge the start and the end of one Unicode code, so that a corresponding UTF format is provided for encoding and decoding the Unicode. The utility model provides a pair of character printing system 100 formally utilized the uniqueness of Unicode code to come the characters that the language that needs to print corresponds, carries out codec according to the UTF format, obtains accurate printing result.
Preferably, the UTF format is UTF-8, UTF-16 or UTF-32. It should be noted that Unicode is only a character set and does not take coding into account when formulating, and the UTF format is based on character numbering, so that appropriate conversion is performed when storing and reading Unicode characters. There are three encoding formats that Unicode can use, as follows:
UFT-8: a variable length coding scheme uses 1-6 bytes for storage;
UFT-32: a fixed length coding scheme that always uses 4 bytes to store regardless of the character number size;
UTF-16: between UTF-8 and UTF-32, using 2 or 4 bytes for storage, the length is both fixed and variable.
When the upper computer 110 generates the print content, the characters to be printed are encoded according to any one of the UTF formats, the thermal printer 120 decodes the encoded data according to the corresponding UTF format to obtain the Unicode code, and then obtains the corresponding characters from the Unicode font library 122.
Preferably, the thermal printer 120 further comprises a dot matrix data generating module 125. The dot matrix data generating module 125 is connected to the searching module 123 and the thermal printing module 124, and the dot matrix data generating module 125 is configured to convert characters to be printed into dot matrix data and send the dot matrix data to the thermal printing module 124.
Preferably, the character printing system 100 further includes a control module disposed in the thermal printer 120, the control module is electrically connected to the decoder 121, the search module 123 and the thermal printing module 124, and the control module is configured to control the decoder 121, the search module 123 and the thermal printing module 124 to cooperatively work to print the characters.
Preferably, the host computer 110 includes a data sending module 112 connected to the encoder 111, and the thermal printer 120 includes a data receiving module 126 connected to the decoder 121. The data sending module 112 corresponds to the data receiving module 126 one by one, the data sending module 112 is used for sending the encoded data generated by the upper computer 110, and the data receiving module 126 is used for receiving the encoded data and transmitting the encoded data to the decoder 121.
Preferably, the data sending module 112 and the data receiving module 126 can communicate by using, by way of example and not limitation, a USB or bluetooth protocol.
Preferably, the thermal printer 120 also includes a display. The display can be connected with the searching module 123, and the display is used for displaying characters to be printed, so that the operation of a user is facilitated.
Two embodiments are provided below and how the character printing system 100 operates is described in conjunction with fig. 1.
Example 1, encoding using UTF-8 format:
suppose that printing is required
Figure BDA0002253699410000071
GB2312 encoding of "o" is 0xB0a1, Unicode encoding is 0x 554A;
Figure BDA0002253699410000072
the KSC5601 code of (1) is 0xB0A1, and the Unicode code is 0xAC 00.
The upper computer 110 encodes Unicode codes 0x554A and 0xAC00 according to UTF-8 format to obtain 0xE5958AAnd 0xEAB080. The byte stream "E5958A EA B080" therein is then sent to the thermal printer 120. The decoder 121 of the thermal printer 120 decodes the received data in the UTF-8 format to obtain 0x554A and 0xAC 00. The searching module 123 searches the Unicode word stock 122 according to the decoding result to obtain the corresponding sum
Figure BDA0002253699410000073
These two words.
Example 2, encoding using UTF-16 format:
suppose that printing is required
Figure BDA0002253699410000074
GB2312 encoding of "o" is 0xB0a1, Unicode encoding is 0x 554A;
Figure BDA0002253699410000075
the KSC5601 code of (1) is 0xB0A1, UnicodeThe code is 0xAC 00.
The upper computer 110 encodes 0x554A and 0x 0xAC00 according to UTF-16 format to obtain 0x554AAnd 0xAC00Unlike the UTF-8 format. The byte stream "554A AC 00" is then sent to the thermal printer 120. The thermal printer 120 then decodes the received data in UTF-16 format to yield 0x554A and 0xAC 00. Looking up the Unicode word stock 122, the corresponding sum can be obtained
Figure BDA0002253699410000076
These two words.
As can be seen from the above two embodiments, UTF/Unicode encoding can be used to easily distinguish between
Figure BDA0002253699410000077
On the thermal printer 120 using GB2312 or GB18030, the printed result will be "o"; on a thermal printer 120 using KSC5601, the printing will be
Figure BDA0002253699410000078
Having thus described the basic concept, it will be apparent to those skilled in the art that the foregoing disclosure is by way of example only, and is not intended to limit the present application. Various modifications, improvements and adaptations to the present application may occur to those skilled in the art, although not explicitly described herein. Such modifications, improvements and adaptations are proposed in the present application and thus fall within the spirit and scope of the exemplary embodiments of the present application.
Also, this application uses specific language to describe embodiments of the application. Reference throughout this specification to "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with at least one embodiment of the present application is included in at least one embodiment of the present application. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, some features, structures, or characteristics of one or more embodiments of the present application may be combined as appropriate.
Although the present application has been described with reference to the present specific embodiments, it will be recognized by those skilled in the art that the foregoing embodiments are merely illustrative of the present application and that various changes and substitutions of equivalents may be made without departing from the spirit of the application, and therefore, it is intended that all changes and modifications to the above-described embodiments that come within the spirit of the application fall within the scope of the claims of the application.

Claims (7)

1. A character printing system characterized by: comprises the steps of (a) preparing a mixture of a plurality of raw materials,
the upper computer comprises an encoder adopting a UTF format and is used for encoding characters to be printed to generate encoded data;
the thermal printer is communicated with the upper computer in a wired or wireless mode and comprises a decoder, a Unicode word stock, a searching module and a thermal printing module, wherein the decoder receives coded data generated by the upper computer, the decoder decodes the coded data in a UTF format, the searching module refers to the Unicode word stock according to a decoding result to obtain the characters needing to be printed, and the thermal printing module is used for printing the characters.
2. The character printing system of claim 1, wherein the UTF format is UTF-8, UTF-16, or UTF-32.
3. The character printing system of claim 1, wherein the thermal printer further comprises a dot matrix data generating module, the dot matrix data generating module is connected to the searching module and the thermal printing module, and the dot matrix data generating module is configured to convert the characters to be printed into dot matrix data and send the dot matrix data to the thermal printing module.
4. The character printing system of claim 1, further comprising a control module disposed within the thermal printer, the control module being electrically connected to the decoder, the lookup module and the thermal printing module, the control module being configured to control the decoder, the lookup module and the thermal printing module to cooperate to effect printing of the character.
5. The character printing system of claim 1, wherein the upper computer includes a data sending module connected to the encoder, the thermal printer includes a data receiving module connected to the decoder, the data sending module corresponds to the data receiving module, the data sending module is configured to send the encoded data, and the data receiving module is configured to receive the encoded data and transmit the encoded data to the decoder.
6. The character printing system of claim 5, wherein the data sending module and the data receiving module communicate using a USB or Bluetooth protocol.
7. The character printing system of claim 1, wherein the thermal printer further comprises a display coupled to the lookup module, the display for displaying the characters to be printed.
CN201921850185.XU 2019-10-30 2019-10-30 Character printing system Active CN211710386U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201921850185.XU CN211710386U (en) 2019-10-30 2019-10-30 Character printing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201921850185.XU CN211710386U (en) 2019-10-30 2019-10-30 Character printing system

Publications (1)

Publication Number Publication Date
CN211710386U true CN211710386U (en) 2020-10-20

Family

ID=72814171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201921850185.XU Active CN211710386U (en) 2019-10-30 2019-10-30 Character printing system

Country Status (1)

Country Link
CN (1) CN211710386U (en)

Similar Documents

Publication Publication Date Title
US9152892B2 (en) Global printing system and method for rendering encoding scheme independent labels having serialization data
US6024289A (en) Method and apparatus for encoding and decoding single byte characters in double byte character set of machine-readable symbologies, such as bar code symbologies
US7636885B2 (en) Method of determining Unicode values corresponding to the text in digital documents
US6422476B1 (en) Method, apparatus and character set for encoding and decoding data characters in data carriers, such as RFID tags
TW497081B (en) One dimensional bar coding for multibyte character
US20070211062A1 (en) Methods and systems for rendering complex text using glyph identifiers in a presentation data stream
US8670976B2 (en) System and methods for encoding and decoding multi-lingual text in a matrix code symbol
US8368567B2 (en) Codepage-independent binary encoding method
US20070086031A1 (en) Printer having a direct printing function and printing method thereof
CN101996160A (en) Method and system for processing script data
US7586628B2 (en) Method and system for rendering Unicode complex text data in a printer
US20020120654A1 (en) Large character set browser
US20140049554A1 (en) Method of manipulating character string in embeded system
CN211710386U (en) Character printing system
KR100632701B1 (en) System and method for providing translated font image data with multi-language font servers connected over network
CN105224509A (en) A kind of method and device generating font format
US20030038958A1 (en) Method and apparatus for determining font types to be downloaded to digital printers
US20120002242A1 (en) Image processing apparatus embedding additional information in document data
JP2012051296A (en) Image forming apparatus
US20030174135A1 (en) System and method for utilizing multiple fonts
Curtin Internationalization of the file transfer protocol
US20080072142A1 (en) Code transformation method for an operation system
CN111930322B (en) Printing method, device, equipment and computer readable storage medium
KR100755533B1 (en) Method and apparatus of generating character set
JP2003533924A (en) Method and system for improving printing performance of file containing bitmap

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant