Skip to content

fix: json-utf8-sanitize#10

Merged
Zeno-sole merged 1 commit into
deepin-community:masterfrom
pluuc:fix/json-utf8-sanitize
Jun 26, 2026
Merged

fix: json-utf8-sanitize#10
Zeno-sole merged 1 commit into
deepin-community:masterfrom
pluuc:fix/json-utf8-sanitize

Conversation

@pluuc

@pluuc pluuc commented Jun 26, 2026

Copy link
Copy Markdown

Log:
scripts: default-nodes: sanitize UTF-8 before JSON serialization

Some hardware reports ALSA card long names with invalid UTF-8 byte sequences (e.g. GBK/GB2312 encoded Chinese characters). This causes Json.Object() serialization to fail, which drops the affected node from the available-nodes list in the select-default-node event.

As a result, users cannot switch to HDMI sinks even though the device appears in wpctl status.

Add sanitize_utf8() to replace invalid UTF-8 sequences with the Unicode replacement character (U+FFFD) before passing properties to Json.Object(). This ensures JSON serialization succeeds and the HDMI node remains in the candidate list.

Log:
scripts: default-nodes: sanitize UTF-8 before JSON serialization

Some hardware reports ALSA card long names with invalid UTF-8 byte
sequences (e.g. GBK/GB2312 encoded Chinese characters). This causes
Json.Object() serialization to fail, which drops the affected node
from the available-nodes list in the select-default-node event.

As a result, users cannot switch to HDMI sinks even though the
device appears in `wpctl status`.

Add sanitize_utf8() to replace invalid UTF-8 sequences with the
Unicode replacement character (U+FFFD) before passing properties
to Json.Object(). This ensures JSON serialization succeeds and
the HDMI node remains in the candidate list.

Signed-off-by: liujiahe <liujiahe@uniontech.com>
@github-actions

Copy link
Copy Markdown

TAG Bot

TAG: 0.5.14-1deepin4
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot

Copy link
Copy Markdown

Hi @pluuc. Thanks for your PR. 😃

@deepin-ci-robot

Copy link
Copy Markdown

Hi @pluuc. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qaqland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

/hold
因为该quilt包的上游版本号变更,详情见: deepin-community/infra-settings#134

@Zeno-sole Zeno-sole merged commit 3cc98b3 into deepin-community:master Jun 26, 2026
5 of 6 checks passed
@Zeno-sole

Copy link
Copy Markdown

/integrate

@github-actions

Copy link
Copy Markdown

AutoIntegrationPr Bot
auto integrate with pr url: deepin-community/Repository-Integration#4201
PrNumber: 4201
PrBranch: auto-integration-28344755499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants