Resolving Korean Encoding Configuration Issues.
已回答
Hi, I am Korean
My environmental configuration is Windows 10, JDK 1.8, intelij community 2024.1.2.
I need to read the work of reading the source code and files now in EUC-KR encoding. So when I run the application, I add the option "-Dfile.encoding" to the JVM to run the application. But when I put this option in, it looks like the Korean is broken in the "Run" Tab.
How can I resolve this?
I've tried almost everything.
Help me
请先登录再写评论。
I think I've run almost everything that's on the internet.
I tried what you told me now, but it doesn't work.
I'm now turning the spring batch, the file encoding that needs to be read is EUC-KR. So, I have to read the JVM in EUC-KR to read it normally and no errors.
I put the option '-Dfile.encoding=EUC-KR' in this repository 'Help -> Custom VM Options' you told me.
And in the 'Run Configuration', VM Options '-Dfile.encoding' is not added and does not work normally.
I don't want to use Eclipse, I want to use intelij.. Is there any other way?
Console default encoding is also already set.
Is there any way to change the encoding of the console itself to EUC-KR?
And if you have any other good ideas, please feel free to let me know
What about checking this Region option and restart your PC?
I already confirmed this issue
my pc unchecked now, and restart pc also I do
> But when I put this option in, it looks like the Korean is broken in the "Run" Tab
If only the console output contains garbled messages, then try `-Dconsole.encoding` instead of `-Dfile.encoding`. Does it help?
I must apply the option '-Dfile.encoding=EUC-KR' to the program unconditionally.
However, even if you put the 'Help -> Custom VM Options' you recommended in the path, it doesn't seem to be applied in the program.
In the source code, there is a part that turns the properties into a repetition and sets the value. And the file we have to read through the spring batch is using EUC-KR encoding, so if the encoding is not correct, an error will occur in the parsing process. So EUC-KR should be applied to the JVM, but it seems to me that it only works if I put it in the 'Edit Configurations - Add VM options' path.
To add to that, If you don't write this option down in the 'Edit Configurations - Add VM Options' path, the Korean language will look normal.
But the program doesn't work normally.
https://uploads.services.jetbrains.com/
I just uploaded a file called 'hello-world.jar'.
Please set the VM option to 'Dfile.encoding=EUC-KR' in 'Edit Configurations' when you start the program.
And the problematic part is the `System.out.println(">> 안녕하세요");` of the 'StepContributionConfiguration' class.
BTW, I could not find the attachment. Please upload it again and paste the upload id here. Thank you in advance.
I saw your reply a little late.
I uploaded the file under the name of 'encoding_help.zip'. I also captured the picture, so please keep that in mind.
We could not find it. Could you please upload it again here (https://uploads.services.jetbrains.com/ ) and paste the upload id?
> And the file we have to read through the spring batch is using EUC-KR encoding, so if the encoding is not correct, an error will occur in the parsing process. So EUC-KR should be applied to the JVM, but it seems to me that it only works if I put it in the 'Edit Configurations - Add VM options' path.
I could not get the point here. The file opening in the editor does not related to the encoding VM option which you added in the run configuration.
The source file encoding setting is `Settings | Editor | File Encodings`. Users can also switch the encoding from the status bar( bottom of the IDE ).
Please help to re-upload the sample again. Thank you,