Skip to content
New issue

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

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

Already on GitHub? # to your account

Character Encoding issue #238

Open
FanJups opened this issue Apr 29, 2023 · 2 comments · May be fixed by #251
Open

Character Encoding issue #238

FanJups opened this issue Apr 29, 2023 · 2 comments · May be fixed by #251
Labels
jsgenerator Related to the whole Project jsgenerator-core core module work in progress At least one person is currently working on this ticket

Comments

@FanJups
Copy link
Member

FanJups commented Apr 29, 2023

While working on PR #237 to solve #217 , I used this symbol "©" inside my html input file but one test failed because of this character then I started thinking about a way to solve that issue.

We should find a way to add encoding utf8 to the InputStream at the core level not when doing tests. Now, we add encoding when doing tests, we should correct that.

https://stackoverflow.com/questions/5928046/spring-mvc-utf-8-encoding

https://stackoverflow.com/questions/5649329/utf-8-encoding-problem-in-spring-mvc

https://stackoverflow.com/questions/29434896/how-to-deal-with-java-encoding-problems-especially-xml

https://www.baeldung.com/java-char-encoding

DOES "multipart/form-data handle utf8 encoding ?

https://www.google.com/search?q=DOES+%22multipart%2Fform-data+handle+utf8+encoding+%3F&rlz=1C1FCXM_pt-PTPT1032PT1032&oq=DOES+%22multipart%2Fform-data+handle+utf8+encoding+%3F&aqs=chrome..69i57j33i22i29i30.19637j1j7&sourceid=chrome&ie=UTF-8

https://issues.redhat.com/browse/RESTEASY-390

https://stackoverflow.com/questions/546365/utf-8-text-is-garbled-when-form-is-posted-as-multipart-form-data

java define encoding of InputStream

https://www.google.com/search?q=java+define+encoding+of+InputStream&rlz=1C1FCXM_pt-PTPT1032PT1032&oq=java+define+encoding+of+InputStream&aqs=chrome..69i57j33i160l2j33i22i29i30l4.19441j1j7&sourceid=chrome&ie=UTF-8

https://stackoverflow.com/questions/3043710/java-inputstream-encoding-charset

@FanJups FanJups added jsgenerator Related to the whole Project jsgenerator-core core module todo Ticket that has to be done labels Apr 29, 2023
@FanJups
Copy link
Member Author

FanJups commented May 1, 2023

set the charset of bytes java

https://www.google.com/search?q=set+the+charset+of+bytes+java&rlz=1C1FCXM_pt-PTPT1032PT1032&oq=set+the+charset+of+bytes+java&aqs=chrome..69i57j33i160j33i22i29i30.22275j1j7&sourceid=chrome&ie=UTF-8

https://stackoverflow.com/questions/88838/how-to-convert-strings-to-and-from-utf8-byte-arrays-in-java

//Convert from String to byte[]:

String s = "some text here";
byte[] b = s.getBytes(StandardCharsets.UTF_8);

//Convert from byte[] to String:

byte[] b = {(byte) 99, (byte)97, (byte)116};
String s = new String(b, StandardCharsets.US_ASCII);

@FanJups FanJups added the work in progress At least one person is currently working on this ticket label May 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
jsgenerator Related to the whole Project jsgenerator-core core module work in progress At least one person is currently working on this ticket
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant