mcfunley / mcfunley/scala-phps
Doesn't support UTF-8 Characters
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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