You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "pferraro (via GitHub)" <gi...@apache.org> on 2026/08/22 08:10:49 UTC

[I] Fury does not preserve script/extensions following serialise/deserialise [fory]

pferraro opened a new issue, #3966:
URL: https://github.com/apache/fory/issues/3966

   ### 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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] Fury does not preserve script/extensions following serialise/deserialise [fory]

Posted by "FireStorm8142 (via GitHub)" <gi...@apache.org>.
FireStorm8142 commented on issue #3966:
URL: https://github.com/apache/fory/issues/3966#issuecomment-5424767798

   The issue that i found is in 'LocaleSerializer.java'
   
   `private static final Map<Tuple3<String, String, String>, Locale> LOCALE_CACHE = new HashMap<>(createCacheMap());` 
   
   only serializes 3 fields, ignoring scripts & extensions.
   `LOCALE_CACHE` also uses a 'Tuple3' so it can't distinguish Locales differing in scripts and extensions.
   
   I'm working on a solution to extend the serialization to include those 2 fields.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] Fury does not preserve script/extensions following serialise/deserialise [fory]

Posted by "dhruv9b (via GitHub)" <gi...@apache.org>.
dhruv9b commented on issue #3966:
URL: https://github.com/apache/fory/issues/3966#issuecomment-5717726416

   @FireStorm8142  Are you still working on this issue?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org