Closed villares closed 1 year ago
The file contains 'white space character(0x20)' and it causes error. It is skipped in Processing 3(javax.xml.bind.DatatypeConverter), but not in Processing 4(java.util.Base64). Delete white spaces may fix it. (line 1987 in PShape.java)
@jaegonlee , thank you for finding a solution to this bug. It looks like you tested this and found the solution does solve the problem. What are the next steps? Will you submit a PR for this?
It looks like this image has an error. I was searching for this error and it can be solved by replacing byte[] decodedBytes = Base64.getDecoder().decode(encodedData);
with byte[] decodedBytes = Base64.getUrlDecoder().decode(encodedData);
. I did this change by we still have an error.
I will try to create a more stable code, first trying to using the default decoder, than the UrlDecoder and if it does not work I will replace all invalid values before using the default encoder again.
You can find more information here: https://www.prostdev.com/post/understanding-the-illegal-base64-character-error-java-groovy-and-mule-4-dw-2-0
Awesome, thanks again @jaegonlee and @vepo. Fix is incorporated for 4.0.2.
This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.
Description
SVG files that could previously be loaded and displayed in Processin 3.5.4 no longer work.
Expected Behavior
Current Behavior
Sketch is interrupted with
Illegal base64 character 20
error.Steps to Reproduce
data
folder inside a new sketch: https://github.com/villares/desenho-sem-argumentos/blob/2022/1_outubro_2022/gerador_completo/base_frente.svgYour Environment
More information
Accessing Processing 4 core from py5 I got this: