This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c245dcd4 fix(java/python): fix meta string encoding order (#2616)
4c245dcd4 is described below

commit 4c245dcd44fca2acf5abd3087cda55ed1b62e1bd
Author: Shawn Yang <[email protected]>
AuthorDate: Tue Sep 16 16:09:22 2025 +0800

    fix(java/python): fix meta string encoding order (#2616)
    
    <!--
    **Thanks for contributing to Apache Fory™.**
    
    **If this is your first time opening a PR on fory, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fory™** community has requirements on the naming of pr
    titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
    
    - Apache Fory™ has a strong focus on performance. If the PR you submit
    will have an impact on performance, please benchmark it first and
    provide the benchmark result here.
    -->
    
    ## Why?
    
    <!-- Describe the purpose of this PR. -->
    
    ## What does this PR do?
    
    <!-- Describe the details of this PR. -->
    
    ## Related issues
    
    <!--
    Is there any related issue? If this PR closes them you say say
    fix/closes:
    
    - #xxxx0
    - #xxxx1
    - Fixes #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fory/issues/new/choose) describing the
    need to do so and update the document if necessary.
    
    Delete section if not applicable.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    
    Delete section if not applicable.
    -->
---
 java/fory-core/src/main/java/org/apache/fory/meta/Encoders.java | 4 ++--
 python/pyfory/meta/typedef.py                                   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/fory-core/src/main/java/org/apache/fory/meta/Encoders.java 
b/java/fory-core/src/main/java/org/apache/fory/meta/Encoders.java
index 281cd6198..24d869b8d 100644
--- a/java/fory-core/src/main/java/org/apache/fory/meta/Encoders.java
+++ b/java/fory-core/src/main/java/org/apache/fory/meta/Encoders.java
@@ -58,12 +58,12 @@ public class Encoders {
 
   static final Encoding[] typeNameEncodings =
       new Encoding[] {
-        UTF_8, LOWER_UPPER_DIGIT_SPECIAL, FIRST_TO_LOWER_SPECIAL, 
ALL_TO_LOWER_SPECIAL
+        UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL, 
FIRST_TO_LOWER_SPECIAL
       };
   static final List<Encoding> typeNameEncodingsList = 
Arrays.asList(typeNameEncodings);
 
   static final Encoding[] fieldNameEncodings =
-      new Encoding[] {UTF_8, LOWER_UPPER_DIGIT_SPECIAL, ALL_TO_LOWER_SPECIAL};
+      new Encoding[] {UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL};
   static final List<Encoding> fieldNameEncodingsList = 
Arrays.asList(fieldNameEncodings);
 
   public static MetaString encodePackage(String pkg) {
diff --git a/python/pyfory/meta/typedef.py b/python/pyfory/meta/typedef.py
index 4edbbfcf7..9a797abee 100644
--- a/python/pyfory/meta/typedef.py
+++ b/python/pyfory/meta/typedef.py
@@ -35,14 +35,14 @@ META_SIZE_MASKS = 0xFFF
 NUM_HASH_BITS = 50
 
 NAMESPACE_ENCODINGS = [Encoding.UTF_8, Encoding.ALL_TO_LOWER_SPECIAL, 
Encoding.LOWER_UPPER_DIGIT_SPECIAL]
-TYPE_NAME_ENCODINGS = [Encoding.UTF_8, Encoding.LOWER_UPPER_DIGIT_SPECIAL, 
Encoding.FIRST_TO_LOWER_SPECIAL, Encoding.ALL_TO_LOWER_SPECIAL]
+TYPE_NAME_ENCODINGS = [Encoding.UTF_8, Encoding.ALL_TO_LOWER_SPECIAL, 
Encoding.LOWER_UPPER_DIGIT_SPECIAL, Encoding.FIRST_TO_LOWER_SPECIAL]
 
 # Field name encoding constants
 FIELD_NAME_ENCODING_UTF8 = 0b00
 FIELD_NAME_ENCODING_ALL_TO_LOWER_SPECIAL = 0b01
 FIELD_NAME_ENCODING_LOWER_UPPER_DIGIT_SPECIAL = 0b10
 FIELD_NAME_ENCODING_TAG_ID = 0b11
-FIELD_NAME_ENCODINGS = [Encoding.UTF_8, Encoding.LOWER_UPPER_DIGIT_SPECIAL, 
Encoding.ALL_TO_LOWER_SPECIAL]
+FIELD_NAME_ENCODINGS = [Encoding.UTF_8, Encoding.ALL_TO_LOWER_SPECIAL, 
Encoding.LOWER_UPPER_DIGIT_SPECIAL]
 
 
 class TypeDef:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to