Skip to content

GUACAMOLE-2272: VNC: add MacRoman clipboard encoding (server) support.#669

Merged
necouchman merged 1 commit into
apache:staging/1.6.1from
bbennett-ks:GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support
May 5, 2026
Merged

GUACAMOLE-2272: VNC: add MacRoman clipboard encoding (server) support.#669
necouchman merged 1 commit into
apache:staging/1.6.1from
bbennett-ks:GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support

Conversation

@bbennett-ks
Copy link
Copy Markdown
Contributor

@bbennett-ks bbennett-ks commented May 1, 2026

The corresponding guacamole-client PR is: GUACAMOLE-2272 (client 1206)

  • Added MacRoman support for VNC clipboard encoding.
  • Added MacRoman read/write conversion support in iconv.
  • Conversion table generated by python script (embedded in a comment).
  • Extended the shared iconv tests to cover MacRoman too and CR normalization.
  • Changed GUAC_COMMON_CLIPBOARD_MAX_LENGTH (50MB) allocations from stack to heap.
  • GUAC_WRITE_CP1252, GUAC_WRITE_MACROMAN: replaced brute search with bsearch().

See https://issues.apache.org/jira/browse/GUACAMOLE-2272 for details.

Test Cases

MacRoman (ASCII only): ABC xyz 123 !@#$%^&*()[]{}.,;:/
MacRoman (Accents):    café naïve résumé señor über Ångström
MacRoman (Symbols):    æ ø ¿ ¡ “quotes” — ellipsis…
NOT MacRoman:          日本語 Русский عربي 中文 😀

Test Results

image

Unit Test Results


PASS: test_common 1 - [rect] clip_and_split: OK
PASS: test_common 2 - [rect] constrain: OK
PASS: test_common 3 - [rect] expand_to_grid: OK
PASS: test_common 4 - [rect] extend: OK
PASS: test_common 5 - [rect] init: OK
PASS: test_common 6 - [rect] intersects: OK
PASS: test_common 7 - [iconv] preserve: OK
PASS: test_common 8 - [iconv] normalize_unix: OK
PASS: test_common 9 - [iconv] normalize_crlf: OK                       <- Modified
PASS: test_common 10 - [iconv] macroman_encode_decode_symmetrical: OK  <- New
PASS: test_common 11 - [iconv] cp1252_invalid_codepoint: OK            <- New
PASS: test_common 12 - [iconv] macroman_invalid_codepoint: OK          <- New
PASS: test_common 13 - [string] guac_count_occurrences: OK
PASS: test_common 14 - [string] split: OK
PASS: test_common 15 - [iconv] normalize_cr: OK                        <- New
============================================================================
Testsuite summary for guacamole-server 1.6.1
============================================================================
# TOTAL: 15
# PASS:  15
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

Copy link
Copy Markdown
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of questions - I'm not terribly familiar with this part of the code, so it's very likely you've done things correctly, I just want to check before merging it.

Comment thread src/common/iconv.c Outdated
Comment thread src/common/iconv.c Outdated
@bbennett-ks bbennett-ks force-pushed the GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support branch from 07448d6 to 0d5059b Compare May 4, 2026 16:22
@necouchman
Copy link
Copy Markdown
Contributor

@bbennett-ks Looks like there's a merge conflict...

@bbennett-ks bbennett-ks force-pushed the GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support branch from 0d5059b to 4c3b8b0 Compare May 4, 2026 17:26
@bbennett-ks
Copy link
Copy Markdown
Contributor Author

@bbennett-ks Looks like there's a merge conflict...

Re-based & re-tested,

@bbennett-ks bbennett-ks force-pushed the GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support branch from 4c3b8b0 to 7ba4217 Compare May 4, 2026 17:44
@bbennett-ks
Copy link
Copy Markdown
Contributor Author

Added 1 more UT: test_iconv__macroman_normalize_cr

@bbennett-ks bbennett-ks force-pushed the GUACAMOLE-2272-VNC-MacRoman-clipboard-encoding-support branch from 7ba4217 to d9b72b3 Compare May 4, 2026 17:51
@necouchman necouchman merged commit 7ca6234 into apache:staging/1.6.1 May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants