Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not add support for GB2312 encoding #487

Closed
xbox1978 opened this issue Dec 22, 2023 · 2 comments
Closed

Why not add support for GB2312 encoding #487

xbox1978 opened this issue Dec 22, 2023 · 2 comments

Comments

@xbox1978
Copy link

Why not add support for GB2312 encoding? Once it's supported, I don't have to worry about using ISO images with Chinese names.

@sp193
Copy link
Member

sp193 commented Dec 23, 2023

If you asked this question, other people may ask why not another encoding. This problem is related to the encoding used on the filesystem for filenames, the encoding used by the OS functions, as well as the character set used (e.g. unicode, or any of the many things like ASCII, GB2312, Shift-JIS). Since most software is written in C, a lot of library functions work with ASCII. Perhaps it is better to use UTF-8 instead, as UTF-8 is backward-compatible with ASCII functions.

If you're thinking about the encoding used for filenames on USB disks: the filename encoding can be specific to the OEM. So it means it can be anything at all. If you go back to the 2000s, each regional release of Windows would use a different encoding, such as GB2312 for Chinese, Shift-JIS for Japanese, ASCII for English-US etc. Windows 7/10 use UTF-16 for the Long File Name (LFN) entries on FAT. In USBHDFSD (the USB filesystem driver), it would appear that the unsupported code points are replaced with "?" characters.

The other halve to this problem, is about support for character sets for display by the application itself; not all glyphs may be supported for display.

@uyjulian
Copy link
Member

GB2312 can be used when you provide your own libraries for handling it.

Reopen if this is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants