-
Notifications
You must be signed in to change notification settings - Fork 82
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
bugfix for Incorrect encoding #548
Conversation
感谢,看起来很优雅(至少比我原来写的优雅hhh) |
I'm sorry, I don't speak this language
…On Sun, 9 Jun 2024, 11:41 qiancy98, ***@***.***> wrote:
感谢,看起来很优雅(至少比我原来写的优雅hhh)
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYA7BP5P2MJ73SQFNGDZGQWO7AVCNFSM6AAAAABJAW3JFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGQZTOMJYGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
That reads
This is just a thanks. |
Thank you so much, and I'm sorry for not knowing your native language.
…On Sun, 9 Jun 2024, 14:22 qiancy98, ***@***.***> wrote:
I'm sorry, I don't speak this language
… <#m_-1726361654267661857_>
On Sun, 9 Jun 2024, 11:41 qiancy98, *@*.*> wrote:
感谢,看起来很优雅(至少比我原来写的优雅hhh) — Reply to this email directly, view it on GitHub
<#548 (comment)
<#548 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAQ7CYA7BP5P2MJ73SQFNGDZGQWO7AVCNFSM6AAAAABJAW3JFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGQZTOMJYGM
<https://github.com/notifications/unsubscribe-auth/AAQ7CYA7BP5P2MJ73SQFNGDZGQWO7AVCNFSM6AAAAABJAW3JFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGQZTOMJYGM>
. You are receiving this because you are subscribed to this thread.Message
ID: @.*>
That reads
Thanks for your coding. This looks elegent. (at least more elegent than
what I typed.)
This is just a thanks.
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYHO27V6KOUBH2LUIO3ZGRJITAVCNFSM6AAAAABJAW3JFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGYYDKMJSGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
sub copy_with_encode { | ||
use File::Copy; | ||
my ( $source, $destination ) = @_; | ||
|
||
if ( $FindBin::Script eq 'latexindent.exe' ) { | ||
if ( $FindBin::Script =~ /\.exe$/ ) { |
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.
Why does this line need changing?
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.
Why does this line need changing?
Users may change the name of the Windows executable file, such as changing latexindent.exe
to latexindent3.24.1.exe
, and the code should still take effect.
Thanks for you help with this. Does this mean that https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#encoding-indentconfig-yaml should be removed? and all references to |
Certainly, they need to be removed. Perhaps new explanations about encoding can be added to inform users:
|
Many thanks. Would like to update the documentation to reflect the this?
…On Tue, 11 Jun 2024, 10:00 fengzyf, ***@***.***> wrote:
Does this mean that
https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#encoding-indentconfig-yaml
should be removed? and all references to encoding should be removed?
Certainly, they need to be removed.
Perhaps new explanations about encoding can be added to inform users:
1. For the Windows executable file latexindent.exe, its options
support UTF-8 characters.
2. For the Windows Perl script latexindent.pl, its options support
characters encoded according to the system code page. You can check the
system code page by using chcp in the command prompt, and refer to the
supported characters at Microsoft's code page identifier table
<https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers>
.
3. For Ubuntu Linux and macOS users, whether using the Perl script or
the executable file, the options support UTF-8 characters.
4. When reading and writing files, the files are read and written in
UTF-8 format by default. That is to say, the encoding format for tex and
yaml files needs to be in UTF-8 format.
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYBFYNSQDQID3VSOHC3ZG24C5AVCNFSM6AAAAABJAW3JFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGE3TIMRVGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The file is |
I have updated the document, but I am not very proficient in English. Therefore, I hope you can help me check it and make any necessary modifications. |
Something isn't right with this... can you look at the output at https://github.com/cmhughes/latexindent.pl/actions/runs/9468805527/job/26086016558?pr=548 ? |
Thanks. This still isn't working https://github.com/cmhughes/latexindent.pl/actions/runs/9488246197/job/26149866332?pr=548 (I appreciate I need to make it more obvious that the checks fail) |
https://github.com/cmhughes/latexindent.pl/actions/runs/9502252857/job/26189794904 This new commit still triggers an error: According to my Google search results, it may have appeared after Perl was updated to 5.39.9.
I don't know how to fix it. However, if you change the Perl version from 'latest' to 5.38 in the 'test-cases-on-pull.yaml', this error message will not appear. |
Many thanks, that's helpful. I've fixed this as of 339d396 Can you re-base your branch and push another commit? |
Thanks so much for your work on this! I really appreciate it. |
what is this pull request about?
fix for Incorrect encoding (possiblely due to #505)
does this relate to an existing issue?
#547
does this change any existing behaviour?
yes
what does this add?
Use Windows:: GetACP() to obtain the code page of the Windows system, and then obtain the system default encoding. Users do not need to specify the encoding.