-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach #284
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ve 0xFFFF using a compatible approach
zzzxl1993
approved these changes
Mar 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
airborne12
added a commit
to airborne12/doris-thirdparty
that referenced
this pull request
Mar 5, 2025
…ve 0xFFFF using a compatible approach (apache#284) fix truncate problem and add write flag
airborne12
added a commit
to airborne12/doris-thirdparty
that referenced
this pull request
Mar 6, 2025
…ve 0xFFFF using a compatible approach (apache#284) fix truncate problem and add write flag
airborne12
added a commit
that referenced
this pull request
Mar 6, 2025
* [fix](unicode) fix 4 bytes unicode read and write bug (#255) * [fix](unicode) fix 4 bytes unicode read and write bug * [fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach (#284) fix truncate problem and add write flag * [test](unicode) add more ut * fix ut
airborne12
added a commit
to airborne12/doris-thirdparty
that referenced
this pull request
Mar 6, 2025
* [fix](unicode) fix 4 bytes unicode read and write bug (apache#255) * [fix](unicode) fix 4 bytes unicode read and write bug * [fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach (apache#284) fix truncate problem and add write flag * [test](unicode) add more ut * fix ut
airborne12
added a commit
that referenced
this pull request
Mar 6, 2025
* [fix](build) fix build for clucene-2.0 * [fix](unicode) fix 4 bytes unicode read and write bug (#289) * [fix](unicode) fix 4 bytes unicode read and write bug (#255) * [fix](unicode) fix 4 bytes unicode read and write bug * [fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach (#284) fix truncate problem and add write flag * [test](unicode) add more ut * fix ut
airborne12
added a commit
to airborne12/doris-thirdparty
that referenced
this pull request
Mar 6, 2025
* [fix](unicode) fix 4 bytes unicode read and write bug (apache#255) * [fix](unicode) fix 4 bytes unicode read and write bug * [fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach (apache#284) fix truncate problem and add write flag * [test](unicode) add more ut * fix ut
airborne12
added a commit
that referenced
this pull request
Mar 7, 2025
* [fix](unicode) fix 4 bytes unicode read and write bug (#255) * [fix](unicode) fix 4 bytes unicode read and write bug * [fix](unicode) resolve truncation problem for Unicode code points above 0xFFFF using a compatible approach (#284) fix truncate problem and add write flag * [test](unicode) add more ut * fix ut
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related PR:#255
This pull request includes several changes to improve the handling of UTF-8 encoding in the
CLucene
library and adds new tests to ensure the correctness of these changes. The most important changes include modifications to theIndexInput
andIndexOutput
classes to handle UTF-8 encoding more accurately and the addition of new test cases for UTF-8 characters.Improvements to UTF-8 encoding handling:
src/core/CLucene/store/IndexInput.cpp
: Modified the handling of byte sequences to differentiate between incorrect and correct UTF-8 encoding, providing a temporary solution to handle 4-byte characters.src/core/CLucene/store/IndexOutput.cpp
: Updated the writing of byte sequences for 4-byte characters to differentiate between incorrect and correct UTF-8 encoding, providing a temporary solution. [1] [2]Addition of new test cases:
src/test/CMakeLists.txt
: AddedTestUTF8Chars.cpp
to the list of test files to be compiled.src/test/test.h
: Declared thetestUTF8CharsSuite
function to include the new UTF-8 character tests.src/test/tests.cpp
: AddedTestUTF8Chars
to the list of unit tests to be executed. [1] [2]