Fury does not preserve script/extensions following serialise/deserialise
- Dominant language
- Java
- Stars
- 4.5k
- Forks
- 443
- Avg merge
- 6h 3m
- Merged PRs (30d)
- 74
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/fory/issues) and found no similar issues.
### Version
Fury only serialises the language/country/variant fields of a Locale, ignoring any script/extensions, resulting in an inconsistent values following deserialisation.
### Component(s)
Java
### Minimal reproduce step
On my machine:
```
Fory fory = Fory.builder().withLanguage(Language.JAVA).build();
for (Locale locale : Locale.getAvailableLocales()) {
Locale deserialised = fory.deserialize(fory.serialize(locale));
assertEquals(locale, deserialised); // This fails for locales that define a script or extensions
}
```
### What did you expect to see?
Assertions should pass.
### What did you see instead?
The assertion fails for any locale that defines a script or extensions.
### Anything Else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start with Fury's Java serialization handling for java.util.Locale and run the provided round-trip over Locale.getAvailableLocales(). Ensure the round-tripped Locale equals the original for locales with scripts or extensions, while preserving the existing language, country, and variant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100