Skip to content
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

Non-UTF-8 encoding used when exporting WebGL file (.html) and slow export performance #18792

Open
2 tasks done
lc6464 opened this issue Dec 29, 2024 · 0 comments
Open
2 tasks done
Labels
File format: WebGL Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Status: Confirmed The issue was confirmed by others Type: Bug This issue or PR is related to a bug

Comments

@lc6464
Copy link

lc6464 commented Dec 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When using the "Export" function in FreeCAD to create a WebGL file (.html), two issues are observed:

  1. Encoding Mismatch: The exported file is encoded using the system default encoding (ANSI, which typically points to encodings like GB2312 depending on the system). However, the HTML structure declares <meta charset="utf-8">. This mismatch can lead to rendering issues and is not the expected behavior.

  2. Slow Export Performance: Exporting a WebGL file takes an unusually long time, significantly longer than exporting a .step file. The WebGL export can take several minutes, while .step export completes almost instantly.

Full version info

OS: Windows 11 build 22635
Architecture: x86_64
Version: 1.0.0.39109 (Git) Conda
Build type: Release
Branch: (HEAD detached at 1.0.0)
Hash: 2fcc5317fe3aee96ca73475986a577719fc78e20
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: Chinese/China (zh_CN)
Stylesheet/Theme/QtStyle: FreeCAD Light.qss/FreeCAD Light/Fusion

Subproject(s) affected?

None

Anything else?

Steps to Reproduce

  1. Open a model in FreeCAD.
  2. Select "Export" from the File menu.
  3. Choose "WebGL file (.html)" as the export format.
  4. Save the file and observe the encoding and export time.

Expected Behavior

  1. The exported WebGL file should use UTF-8 encoding, matching the declared charset in the HTML.
  2. The export process for WebGL files should be optimized to reduce the export time to a more reasonable duration.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lc6464 lc6464 added Status: Needs confirmation Missing confirmation from other testers Status: Needs triage Missing triage labels Dec 29, 2024
@maxwxyz maxwxyz added Type: Bug This issue or PR is related to a bug Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Status: Confirmed The issue was confirmed by others File format: WebGL and removed Status: Needs confirmation Missing confirmation from other testers Status: Needs triage Missing triage labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
File format: WebGL Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Status: Confirmed The issue was confirmed by others Type: Bug This issue or PR is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants