-
Notifications
You must be signed in to change notification settings - Fork 106
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
Correctly handle source members with variant characters in their name #1940
Conversation
Signed-off-by: Seb Julliand <[email protected]>
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.
@sebjulliand I gave the PR a spin, but had no success... 😞
With or without SQL enabled, when I tried to open a member having à
in the name, I got the following error:
The member name is correct in the list:
???
Does it work at your end? Could be my system setup...
@chrjorgensen check out my comment here: #1935 (comment) I'll add a commit to this PR with the copy to a temporary member (I managed to open the member, I just need to apply the same logic when saving). We'll see how it goes (I'll un-draft the PR then). |
Signed-off-by: Seb Julliand <[email protected]>
@chrjorgensen you can give it another try; I managed to open and save my member with a |
@sebjulliand I have not tried your workaround yet - but when I look at the code, it seems you're copying to temporary member in case of any variant characters in the name. Which would mean most non-US users will be hit by this workaround, even though they've had no problems so far. Correct? If correct, wouldn't it be better to only do the workaround if they would have been hit by the if ( this.ibmi.variantChars.local !== this.ibmi.variantChars.local.toLocaleUpperCase() ) { That way we run as before for the majority of the users - no change for them... What do you think? |
@chrjorgensen you're right, let's reduce the scope only to those who use dangerous variants 😅 |
Signed-off-by: Seb Julliand <[email protected]>
@chrjorgensen there you go |
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.
@sebjulliand I can confirm being able to open and edit and save members having à
in the member name when I simulate being French (CCSID 297 etc) when running your PR. 👍
Approved - merge at will... 😃
Thank you @chrjorgensen ! |
Changes
Fixes #1935
Member names used to be uppercased regarless of the variant characters they may contain. Turns out that
à
is one of CCSID 297 (French) variant chars and it gets uppercased toÀ
, which raises amember not found
error.This PR adds a new
upperCaseName
method to theIBMi
class to correctly uppercase names, preservingthe variant chars case.How to test this PR
FR_FR
297
à
in its nameChecklist