Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Encoding error in AD server when sending non-English values as CN attribute #883

Closed
glozeus opened this issue May 15, 2023 · 4 comments
Closed

Comments

@glozeus
Copy link

glozeus commented May 15, 2023

When sending Korean values in the format of CN=홍길동 to the AD server, it appears as í��길ë�� with garbled characters. Is there any way to resolve this issue?

image

@jsumners
Copy link
Member

I don't understand what this screenshot is supposed to be showing. Please provide a minimal reproducible example.

@glozeus
Copy link
Author

glozeus commented May 16, 2023

-- code

client.bind(connection.username, connection.password, function (err) {
    if (err) {
        console.log("Error in new connetion " + err)
    } else {

      var entry = {
        objectclass: 'user',
        };

       // const nm = 'HGD' //English ADD Succcess.
       const nm = '홍길동' //Korean ADD Succcess. but the characters are corrupted and saved

        const dn = 'CN=' + nm + ',OU=a,DC=zeus,DC=com';

        client.add(dn, entry, function (err) {
            if (err) {
                console.log("err in new user " + err);
            } else {
                console.log("added user")
            }
        });
    }

image

When Korean characters are included in CN, they get corrupted and additional characters are added.

jsumners added a commit that referenced this issue May 16, 2023
@jsumners
Copy link
Member

See the test added in #884. The entry gets added, retrieved, and shows the same characters as was input.

@jsumners
Copy link
Member

I am closing this due to lack of response and not being able to replicate the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants