mcfunley / mcfunley/scala-phps

Doesn't support UTF-8 Characters

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
8
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The PHP serialization format specifies the length of every field in bytes. The PHPS library counts off string fields in characters. This works fine when characters are all one byte (e.g. ASCII), but fails otherwise. Try throwing some non-ASCII characters into the tests to see it barf.

I've currently worked around this by replaceAll'ing the non-ASCII characters that showed up in my use case, but it wouldn't be that big of a deal to fix a bit more robustly. If I keep using the library past my limited use case, I'll do so ... just posting the issue here in case someone else runs into the problem.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by adding non-ASCII characters to the existing tests, as the issue suggests, and use the failures to locate where string lengths are calculated during PHP serialization. Verify that fields containing multibyte UTF-8 characters serialize and deserialize correctly, while ASCII cases continue to pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.