tcobbs / ldview

Real-time 3D viewer for displaying LDraw models
https://tcobbs.github.io/ldview/
GNU General Public License v2.0
87 stars 17 forks source link

Model Tree doesn't treat input text as UTF-8 #68

Closed tcobbs closed 1 year ago

tcobbs commented 1 year ago

Describe the bug The Model Tree dialog accepts invalid UTF-8 in LDraw files and seeming treats it as Latin 1. It may or may not have problems with actual UTF-8 text.

To Reproduce Steps to reproduce the behavior:

  1. Open /parts/s/2902s01.dat as of 2022-02-22.
  2. Search for "Cran" in the Model Tree.
  3. Notice the line displays as 0 Cran creusé even though the last character is not valid UTF-8.

Expected behavior Invalid UTF-8 should have some kind of indication that it is invalid (preferably the � character).

tcobbs commented 1 year ago

This is fixed in LDView 4.5. (Note that the file listed here has subsequently been updated to contain valid UTF-8.