Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

读取字符串乱码bug #8

Open
GhostCakeMaker opened this issue Dec 5, 2019 · 1 comment
Open

读取字符串乱码bug #8

GhostCakeMaker opened this issue Dec 5, 2019 · 1 comment

Comments

@GhostCakeMaker
Copy link

StringColumn.cs文件中36行处方法DoLoad,修改个bug。之前一直解析乱码,修改后就好了。如下:

    protected override string DoLoad(byte[] buffer, int offset, Encoding encoding)
    {
        if (_parsedCharsBuffer == null)
        {
            _parsedCharsBuffer = new char[Size];
        }
        var bytes = buffer.Skip(offset).Take(Size).ToArray();
        
        var result = encoding.GetString(bytes).Trim('\0').Trim(' ');
        return result;
    }

image

@eXavera
Copy link
Owner

eXavera commented Dec 6, 2019

Thank you for the bug report. I'll investigate it.

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