Closed Bug 1915295 Opened 1 year ago Closed 1 year ago

Saving and reloading files in the style editor does not properly encode unicode characters

Categories

(DevTools :: Style Editor, defect, P3)

Firefox 129
Desktop
Windows 10
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1836706

People

(Reporter: wodjv1d3n, Unassigned)

Details

Attachments

(1 file)

Attached image before-after.jpg

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

  • Open dev tools (F12) and navigate to the Style Editor tab

  • Click the + button to create and append a new stylesheet to the document

  • Paste some text with unicode characters, here is an example where I discovered this:
    .hlist dd:after,
    .hlist li:after {
    content: " · ";
    }

  • ctrl+s to save the file (location does not matter as far as I can tell)

  • Press the button next to the + to import a stylesheet, and choose the sheet that was just saved. It should now read:
    .hlist dd:after,
    .hlist li:after {
    content: " · ";
    }

  • Doing this repeatedly, such as when refreshing the page a lot after changes for testing, will compound the issue and turn that bullet into longer strings like ÃÂ÷

Actual results:

Unicode characters seem to be encoded incorrectly when saving, resulting in them being "corrupted" when re-loading. In addition to the bullet, I've also noticed this with “”. This does not seem to happen with ASCII characters.

Additional note, I first noticed this issue on May 30, 2024, but was only just now convinced I should report it.

Expected results:

Unicode characters should be unchanged when saving and reloading the file.

OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop

The Bugbug bot thinks this bug should belong to the 'DevTools::Style Editor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Style Editor
Product: Firefox → DevTools

Thanks for filing

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jdescottes)
Priority: -- → P3

Sounds like a duplicate from Bug 1836706

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1836706
Flags: needinfo?(jdescottes)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: