Conversation
To support encoded by Shift-JIS(Japanese) , GB2312 and GBK(Chinese) files
erhuz
left a comment
There was a problem hiding this comment.
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) .