-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update TXT.php #28629
Update TXT.php #28629
Conversation
To support encoded by Shift-JIS(Japanese) , GB2312 and GBK(Chinese) files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to indent row 70 and remove an indentation from row 69.
Thanks 👍 I would say the issue is not the encoding but the font used for txt preview NotoSans-Regular.ttf On the other hand imagettftext expects a utf8 encoded string as text anyway so a explicit is probably not wrong. Yet https://www.php.net/manual/en/function.mb-convert-encoding should be easier to use here as the from encoding is detected automatically. |
Thanks, I appreciate your suggestion. Co-authored-by: kesselb <mail@danielkesselberg.de>
Thanks, I appereate your suggestion :) Co-authored-by: kesselb <mail@danielkesselberg.de>
In my environment, mb_convert_encoding() doesn't work properly without 'auto' in from_encoding.
Thanks @MasahikoSada, can you provide a simple text document or a string with some characters to test the change? |
@kesselb This is a sample file endoced by SHIFT-JIS(ANSI). Screen shot is here. |
Hi, Can you show me the version with mb_convert_encoding and 'auto' option. |
Thanks for your comment. |
To support files encoded by Shift-JIS(Japanese) , GB2312 and GBK(Chinese) .