Bug 283443 - net-mgmt/unifi8: set UTF-8 java encoding to allow UTF-8 in wireless SSIDs
Summary: net-mgmt/unifi8: set UTF-8 java encoding to allow UTF-8 in wireless SSIDs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Juraj Lutter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-20 15:40 UTC by Lily Foster
Modified: 2024-12-27 21:09 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (otis)


Attachments
Patch to add '-Dfile.encoding=UTF-8' to default 'unifi_javaflags' in net-mgmt/unifi8 rc file (521 bytes, patch)
2024-12-20 15:40 UTC, Lily Foster
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lily Foster 2024-12-20 15:40:22 UTC
Created attachment 255989 [details]
Patch to add '-Dfile.encoding=UTF-8' to default 'unifi_javaflags' in net-mgmt/unifi8 rc file

Currently, attempting to use UTF-8 characters in SSID names (or at trying to use emoji) does appear correctly in the UniFi interface, but the characters get ascii-fied to '?' when pushing to access points and so the broadcast SSID is different and incorrect.

This appears to be because the rc file for UniFi in the FreeBSD port does not include '-Dfile.encoding=UTF-8' in the Java flags (and both the systemd unit and LSB init script provided in the upstream UniFi package for Debian do include this flag and do not suffer from this issue). I've manually added the relevant flag by setting 'unifi_javaflags' in rc.local and confirmed that it does fix the issue.

I've attached a patch to ports that should fix the default 'unifi_javaflags' value in the port's rc file to include the UTF-8 flag itself.

Let me know if you need more info, thanks!
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-12-27 21:00:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=98e172c68bba6b77d2430d5ff1304261920e90ea

commit 98e172c68bba6b77d2430d5ff1304261920e90ea
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2024-12-27 20:55:49 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2024-12-27 20:59:50 +0000

    net-mgmt/unifi8: Set UTF8 encoding on startup

    In order to use non-ASCII characters in WiFi network names,
    instruct java to use UTF8 encoding, similarly to what is
    also done in startup script for Linux.

    PR:             283443

 net-mgmt/unifi8/Makefile       | 1 +
 net-mgmt/unifi8/files/unifi.in | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Comment 2 Juraj Lutter freebsd_committer freebsd_triage 2024-12-27 21:09:13 UTC
Committed, thanks.