Computer system and method for supporting multi-language file processing

By creating aliases for file names and converting them to the target character encoding standard, the problem of manually switching system languages ​​in GUI programs during multilingual processing is solved, thus achieving simplified multilingual file processing.

CN121996337APending Publication Date: 2026-05-08NUVOTON
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NUVOTON
Filing Date
2025-05-21
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing GUI programs require manual switching of the system language/language suite when processing multilingual files, and there are issues with inaccurate character conversion.

Method used

By creating aliases for file names and converting the aliases to the target character encoding standard, low-level file processing is achieved, avoiding direct reliance on the system language suite.

Benefits of technology

It eliminates the need for manual installation and switching of system language packages, simplifying multilingual processing in GUI programs and reducing development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996337A_ABST
    Figure CN121996337A_ABST
Patent Text Reader

Abstract

The invention provides a computer system and method for supporting multi-language file processing. The computer system comprises a storage unit and a processing unit. The storage unit stores a graphical user interface (GUI) program and a file. The processing unit loads a GUI program from the storage unit to perform the following steps: receiving a file name of a file, where the file name is represented in a first language and follows a first character coding standard; establishing an alias for the file name, where the alias is expressed in the second country language and follows the first character coding standard; connecting the alias to the file such that both the file name and the alias refer to the file; and converting the alias to conform to a second character coding standard so as to start underlying processing conforming to the second character coding standard for the file referenced by the alias.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to GUI programs, and more particularly to GUI programs that support multilingual file processing. Background Technology

[0002] A Graphical User Interface (GUI) is a way for users to interact with a computer system or application through visual images and icons. Unlike the earlier Command Line Interface (CLI), a GUI typically includes visual elements such as windows, buttons, icons, drop-down menus, and dialog boxes for users to interact with using a mouse and keyboard. To display and handle multiple languages ​​and symbols, GUIs often use Unicode.

[0003] Unicode is a character encoding standard designed to assign unique codes to all the world's writing systems and symbols, enabling characters from different languages ​​to be consistently represented and processed across various computer systems, software, and networks. Unicode supports various languages, such as English, Chinese, and Japanese, as well as special symbols and emoticons. It achieves cross-platform character processing through multiple encoding methods (such as UTF-8 and UTF-16), and also solves the incompatibility problems of various encoding systems in the past.

[0004] However, long before the release of Unicode in 1991, other earlier character encoding standards had already undergone significant development, accumulating numerous related static and dynamic libraries (DLLs). These character encoding standards, such as the American Standard Code for Information Interchange (ASCII) and the Multi-byte Character Set (MBCS), did not assign unique encodings to characters in languages ​​other than English. The following will use MBCS as an example to illustrate this.

[0005] MBCS is also a character encoding standard that allows using more than one byte to represent characters. It uses one byte to represent basic English letters and symbols, and more bytes are required to represent other languages such as Chinese, Japanese, and Korean. According to language families, MBCS can be further subdivided. For example, BIG5 for representing traditional Chinese, GB2312 for representing simplified Chinese, EUC-KR for representing Korean, etc. These other languages share the same byte range. In other words, these other languages share the same set of MBCS encodings. In other words, the same set of MBCS encodings can correspond to characters in different languages. As for which language's characters a set of MBCS encodings corresponds to, it depends on the language family / language pack used by the operating system. For example, the MBCS encoding 0xB0A1 represents the Chinese character "啊" in simplified Chinese (GB2312), but represents Korean

[0006] If a current GUI program using Unicode wants to continue to use an MBCS executable file, static library, or dynamic library to process multilingual files, it must rely on the application programming interface (API) provided by the operating system to first convert Unicode characters into MBCS characters. For example, the MultiByteToWideChar() function provided by Windows can convert Unicode characters into MBCS characters. Since this conversion is also related to the language family / language pack used by the operating system, the user of the GUI program must install the corresponding language pack according to the language used. That is to say, when different languages are to be used, the user must manually switch the language family. In addition, when there are characters in different languages in a piece of text, unavailable MBCS characters may be obtained after conversion. Therefore, this approach has many limitations and brings a lot of inconvenience to the users of GUI programs.

[0007] Therefore, a computer system and method for supporting the processing of multilingual files are needed to solve the above problems. Summary of the Invention

[0008] Embodiments of this application provide a computer system supporting multilingual file processing, comprising a storage unit and a processing unit. The storage unit stores GUI programs and files. The processing unit loads the GUI program from the storage unit to perform the following steps: receiving the file name of a file, wherein the file name is represented in a first language and follows a first character encoding standard; creating an alias for the file name, wherein the alias is represented in a second language and follows the first character encoding standard; linking the alias to the file, such that both the file name and the alias reference the file; and converting the alias to follow a second character encoding standard to initiate low-level processing following the second character encoding standard for the file referenced by the alias.

[0009] Embodiments of this application provide a method for supporting multilingual file processing, implemented in a computer system. The computer system includes a storage unit and a processing unit. The storage unit stores a GUI program and a file. The processing unit loads the GUI program from the storage unit to execute this method, which includes: receiving the file name of a file, wherein the file name is represented in a first language and follows a first character encoding standard; creating an alias for the file name, wherein the alias is represented in a second language and follows the first character encoding standard; linking the alias to the file, such that both the file name and the alias reference the file; and converting the alias to follow a second character encoding standard to initiate low-level processing following the second character encoding standard for the file referenced by the alias.

[0010] The computer system and method for multilingual file processing provided in this application can be executed or processed by static or dynamic function libraries that do not support multiple languages, regardless of the language of the file name. Furthermore, by creating aliases for file names and linking these aliases to the file, the file can be executed or processed by function libraries that do not support multiple languages, regardless of the language of the file name. Thus, GUI program developers do not need to develop separate multilingual function libraries, reducing development and maintenance costs. In addition, GUI program users do not need to manually install and switch system language packages, making GUI program usage simpler and more user-friendly. Attached Figure Description

[0011] This application will be better understood from the following description of exemplary embodiments in conjunction with the accompanying drawings. Furthermore, it should be understood that the execution order of the blocks in the flowcharts of this application may be changed, and / or certain blocks may be altered, deleted, or merged.

[0012] Figure 1 This is a system architecture diagram of a computer system according to an embodiment of the present invention.

[0013] Figure 2 This is a flowchart of a method according to an embodiment of the present invention.

[0014] Figure 3 This is a flowchart of a method according to an embodiment of the present invention.

[0015] Figure 4 This is a flowchart of a method according to an embodiment of the present invention.

[0016] Symbol Explanation

[0017] 10: Computer System

[0018] 11: Processing Unit

[0019] 12: Storage unit

[0020] 13: GUI program

[0021] 14: Documents

[0022] 20, 30, 40: Methods

[0023] 201~205, 301~304, 401~404: Steps Detailed Implementation

[0024] The following description illustrates various embodiments of the present invention, but is not intended to limit the scope of the invention. The actual scope of the invention is defined by the claims.

[0025] In the embodiments listed below, the same or similar elements or components will be represented by the same reference numerals.

[0026] The serial numbers in this specification and the claims, such as "first," "second," etc., are for ease of explanation only and there is no sequential relationship between them.

[0027] The descriptions of embodiments of the apparatus or system in this specification also apply to embodiments of the method, and vice versa.

[0028] Figure 1 This is a system architecture diagram of a computer system 10 according to an embodiment of the present invention. Figure 1 As shown, the computer system 10 includes a processing unit 11 and a storage unit 12, the storage unit 12 storing a GUI program 13 and a file 14.

[0029] Computer system 10 can be any computer system or processing device with computing power, such as a personal computer (e.g., a desktop computer or a laptop computer), a server computer, or a mobile device (e.g., a tablet computer or a smartphone), but this application does not limit it.

[0030] Processing unit 11 may include one or more general-purpose or special-purpose processors and combinations thereof for executing instructions, such as a central processing unit (CPU) and / or a graphics processing unit (GPU). Processing unit 11 may further include volatile memory such as dynamic random access memory (DRAM) and / or static random access memory (SRAM), but this application is not limited thereto.

[0031] Storage unit 12 may include any device containing non-volatile memory (such as read-only memory, electrically erasable programmable read-only memory (EEPROM), flash memory, or non-volatile random access memory (NVRAM), such as hard disk (HDD), solid-state drive (SSD), or optical disk, but this application is not limited to this.

[0032] The program logic of a GUI program can be implemented using any programming language and framework, such as Javascript and React, or Python and PyQt, but this application is not limited to this. The user interface (UI) of a GUI program can be designed using any design tool, but this application is not limited to this. File 14 can be any type of file, such as a text file, image file, audio file, video file, source code file, executable file, etc., but this application is not limited to this.

[0033] In various embodiments, the processing unit 11 loads the GUI program 13 from the storage unit 12 to implement a method for supporting multilingual file processing, which will be referred to below. Figure 2 Explanation.

[0034] Figure 2 This is a flowchart of a method 20 for processing multilingual documents according to an embodiment of the present invention. Figure 2 As shown, method 20 includes steps 201 to 205.

[0035] In step 201, the processing unit 11 receives the file name of file 14, which is represented in a first language and follows a first character encoding standard.

[0036] In one embodiment, the first character encoding standard is Unicode.

[0037] It is worth noting that this application does not restrict the first language, meaning that the first language is not limited to a single language and can be a mixture of multiple languages. More specifically, it can be a mixture of letters, symbols, and emojis from various languages. For example, the file name of document 14 can be entirely in English (e.g., Plan), entirely in Chinese (e.g., Plan), or a mixture of Chinese, Japanese, and English (e.g., Plan_Plan_Plan).

[0038] In step 202, the processing unit 11 creates an alias for the file name. This alias is represented in a second language and follows the first character encoding standard.

[0039] In one embodiment, the second language is English.

[0040] In step 203, processing unit 11 links the alias to the file, so that both the file name and the alias reference this file.

[0041] In a file system, a "link" is a reference to a file, and can be divided into hard links and soft / symbolic links. A hard link is a direct reference to a target file, allowing the target file's filename and alias to both point to the target file's memory location. A soft link is an indirect reference to a target file, allowing the target file's filename and alias to both point to the target file's absolute or relative path. When accessing a soft link, the system automatically redirects to the target file.

[0042] This application does not restrict the method of "linking." As long as file operations can be performed through aliases, the "link" used in step 203 can be a hard link, a soft link, or a character link. Generally, "links" can be created using command lines or functions. For example, in Linux, hard links can be created using the `ln` command or the `link()` function, and soft links / symlinks can be created using the `ln -s` command or the `symlink()` function. For example, in Windows, soft links / symlinks can be created using the `mklink` command or the `CreateSymbolicLink()` function, and hard links can be created using the `mklink / h` command or the `CreateHardLink()` function.

[0043] It is important to note that aliases must be unique within the same directory to avoid failures in creating hard links or link / symbolic links. Therefore, in an implementation, an alias can be a random string of letters, a random string of alphanumeric characters, a timestamp plus a random string of letters, a universally unique identifier (UUID), or any combination of the above methods, but this application does not limit it.

[0044] In one embodiment, the processing unit 11 records file names and aliases in a file name mapping table. Table 1 below shows the file name mapping table when the second language is English. As shown in Table 1, regardless of the language in which the file name is represented, a unique alias will be associated with it in the file name mapping table. For example, a Japanese-Korean mixed file name "カタ" This can be associated with the alias "fkjdklw".

[0045] Table 1

[0046]

[0047] A filename mapping table will help improve the efficiency of obtaining the correspondence between filenames and aliases, especially when restoring filenames from aliases for display in a GUI program. See step 303 below for more details.

[0048] In step 204, the processing unit 11 converts the alias to conform to the second character encoding standard.

[0049] In one embodiment, the second character encoding standard is MBCS. In one implementation, the conversion between the first and second character encoding standards can be achieved through APIs provided by the operating system. For example, in Windows, when the first character encoding standard is Unicode, the WideCharToMultiByte() function can be used to convert Unicode characters to MBCS characters. Correspondingly, the MultiByteToWideChar() function can be used to convert MBCS characters to Unicode characters. As another example, in Linux, the iconv() function can be used to achieve a similar conversion to that in Windows.

[0050] In one example, the second language is English, the first character encoding standard is Unicode, and the second character encoding standard is MBCS. Since English characters can be uniquely recognized in both Unicode and MBCS, when using the API of the character encoding standard, it is not necessary to rely on the language package installed on the operating system. This is relatively user-friendly for GUI program users, saving them the trouble of installing and switching language packages.

[0051] In step 205, the processing unit 11 initiates low-level processing of the alias reference file in accordance with the second character encoding standard.

[0052] Low-level processing refers to file operations or processing defined outside the GUI program. In one embodiment, low-level processing includes calling functions in a function library that conforms to a second character encoding standard. The function library can be a static function library (e.g., a ".a" or ".lib" file) or a dynamic function library (e.g., a ".so" or ".dll" file), but this application is not limited to either. In another embodiment, the file is an executable file (e.g., a ".exe" or ".sh" file), and low-level processing includes executing the executable file. Since the alias has been converted to conform to the second character encoding standard in step 204, it can be directly input as a function parameter into a function that conforms to the second character encoding standard.

[0053] In one example, the first character encoding standard is Unicode and the second character encoding standard is MBCS. As mentioned earlier, since MBCS predates Unicode, there are already many readily available MBCS function libraries. For GUI program developers, using existing function libraries directly can improve development efficiency and save the cost of developing and maintaining new function libraries. Similarly, the same applies to other character encoding standards that predate Unicode.

[0054] Figure 3 This is a flowchart of a method 30 for processing multilingual documents according to an embodiment of the present invention. Figure 3 As shown, method 30 includes Figure 2 Steps 201-205 further include steps 301-304. In this embodiment, the underlying processing involves calling functions from a function library that conforms to the second character encoding standard.

[0055] In step 301, processing unit 11 receives an alias conforming to the second character encoding standard from the underlying processing. In step 302, the alias is converted to conform to the first character encoding standard. In step 303, the alias conforming to the first character encoding standard is mapped back to the file name. In step 304, the file name is displayed on the interface of the GUI program.

[0056] In one embodiment, processing unit 11 retrieves the file name by looking up a file name mapping table based on an alias that conforms to a first character encoding standard. In one example, the file name mapping table is shown in Table 1. Processing unit 11 can retrieve the file name by looking up the file name mapping table based on the alias. For example, the alias "fkjdklw" can correspond to the Japanese-Korean mixed file name "カタ". ".

[0057] Figure 4 This is a flowchart of a method 40 for processing multilingual documents according to an embodiment of the present invention. Figure 4 As shown, method 40 includes Figure 2 Steps 201-205 further include steps 401-404. In this embodiment, the underlying processing is executing the executable file.

[0058] In fact, steps 401 to 404 also include Figure 3 Steps 301-304. Compared to steps 301-304, in step 401, processing unit 11 further receives the execution result information of the executable file from the underlying processing. In step 402, processing unit 11 further converts the execution result information to conform to the first character encoding standard. In step 403, processing unit 11 further converts the execution result information conforming to the first character encoding standard into a representation in the selected language of the GUI program. In step 404, processing unit 11 further displays the file name and the execution result information represented in the selected language on the interface of the GUI program.

[0059] In one embodiment, the processing unit 11 further searches a pre-stored information mapping table based on the execution result information to obtain the execution result information expressed in the selected language. The information mapping table pre-stores common return codes when executing executable files, as well as textual information used to interpret the execution results.

[0060] In one example, the information mapping table is shown in Table 2. The processing unit 11 retrieves the corresponding text information from Table 2 based on the return code of the executable file. For example, a return code of 0 indicates successful execution. A return code of 3 indicates execution failure because the file was not found.

[0061] Table 2

[0062]

[0063]

[0064] Since the meaning of each return code is known and the corresponding text information can be predefined, the information mapping table can store only the text information of the common language, English. Alternatively, the information mapping table can store text information of various languages, so that the processing unit 11 can select the corresponding text information according to the selected language, but this application is not limited to this.

[0065] The computer system and method for multilingual file processing provided in this application can be executed or processed by static or dynamic function libraries that do not support multiple languages, regardless of the language of the file name. Furthermore, by creating aliases for file names and linking these aliases to the file, the file can be executed or processed by function libraries that do not support multiple languages, regardless of the language of the file name. Thus, GUI program developers do not need to develop separate multilingual function libraries, reducing development and maintenance costs. In addition, GUI program users do not need to manually install and switch system language packages, making GUI program usage simpler and more user-friendly.

[0066] The preceding paragraphs describe various forms. Clearly, the teachings herein can be implemented in multiple ways, and any particular architecture or functionality disclosed in the examples is merely representative. Based on the teachings herein, it should be understood in the art that the individual forms disclosed herein can be implemented independently, or that two or more forms can be implemented in combination.

[0067] Although the present application has been described above with reference to embodiments, it is not intended to limit the present application. Any person skilled in the art may make some modifications and refinements without departing from the spirit and scope of the present application. Therefore, the scope of protection of the invention shall be determined by the scope defined in the appended claims.

Claims

1. A computer system that supports multilingual document processing, characterized in that, include: A storage unit stores a graphical user interface (GUI) program and a file; as well as A processing unit loads the GUI program from the storage unit to perform the following steps: Receive the file name of the file, wherein the file name is represented in the language of the first country and follows the first character encoding standard; Create an alias for the file name, wherein the alias is represented in a second language and follows the first character encoding standard; Link the alias to the file, so that both the file name and the alias reference the file; as well as The alias is converted to conform to the second character encoding standard, so that a low-level process that conforms to the second character encoding standard is initiated for the file referenced by the alias.

2. The computer system as described in claim 1, characterized in that, The second language is English.

3. The computer system as described in claim 1, characterized in that, The first character encoding standard is Unicode, and the second character encoding standard is a multi-byte character set.

4. The computer system as described in claim 1, characterized in that, The underlying processing involves calling a function from a function library that conforms to the second character encoding standard.

5. The computer system as described in claim 1, characterized in that, This processing unit further performs: Record the file name and its alias in a file name mapping table; and Based on the alias that follows the first character encoding standard, look up the file name mapping table to obtain the file name.

6. A method for supporting multilingual document processing, characterized in that, Implemented in a computer system, the computer system including a storage unit and a processing unit, the storage unit storing a graphical user interface (GUI) program and a file, the processing unit loading the GUI program from the storage unit to execute the method, including: Receive the file name of the file, wherein the file name is represented in the language of the first country and follows the first character encoding standard; Create an alias for the file name, wherein the alias is represented in a second language and follows the first character encoding standard; Link the alias to the file, so that both the file name and the alias reference the file; as well as The alias is converted to conform to the second character encoding standard, so that a low-level process that conforms to the second character encoding standard is initiated for the file referenced by the alias.

7. The method as described in claim 6, characterized in that, Including: The underlying processing receives the alias conforming to the second character encoding standard and converts the alias to conform to the first character encoding standard. This alias, which follows the first character encoding standard, will be mapped back to the file name; and Display the file name on the interface of the GUI program.

8. The method as described in claim 6, characterized in that, The second language is English.

9. The method as described in claim 6, characterized in that, The first character encoding standard is Unicode, and the second character encoding standard is a multi-byte character set.

10. The method as described in claim 6, characterized in that, Including: Record the file name and its alias in a file name mapping table; and Based on the alias that follows the first character encoding standard, look up the file name mapping table to obtain the file name.

11. The method as described in claim 6, characterized in that, This file is an executable file, and the underlying processing includes executing this executable file.

12. The method as described in claim 11, characterized in that, Including: The underlying processing receives the execution result information of the executable file. The execution result information will be converted to conform to the first character encoding standard; and The execution result information, which follows the first character encoding standard, is converted into the selected language of the GUI program and displayed on the interface of the GUI program.