NDbfReader icon indicating copy to clipboard operation
NDbfReader copied to clipboard

读取字符串乱码bug

Open GhostCakeMaker opened this issue 6 years ago • 1 comments

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

GhostCakeMaker avatar Dec 05 '19 09:12 GhostCakeMaker

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

eXavera avatar Dec 06 '19 09:12 eXavera