Skip to content
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

Add a characterSet for LineRecordReader #7407

Closed
Charele opened this issue Mar 30, 2019 · 1 comment

Comments

@Charele
Copy link

commented Mar 30, 2019

For example,
val a = new CSVRecordReader
a.initialize(new FileSplit(new File("d:\111.txt")))
a.next().show
If the file 111.txt is not a UTF format(for example, Chinese GBK), it does not work.

In LineRecordReader's getIterator() method,
iterator = IOUtils.lineIterator(new InputStreamReader(inputStream));
I think it's default character set is utf8.

So I think we should add a character set in LineRecordReader,
iterator = IOUtils.lineIterator(new InputStreamReader(inputStream, charsetName));

@AlexDBlack AlexDBlack self-assigned this Apr 1, 2019

AlexDBlack added a commit that referenced this issue Apr 1, 2019
AlexDBlack added a commit that referenced this issue Apr 2, 2019
AlexDBlack added a commit that referenced this issue Apr 2, 2019
[WIP] Misc fixes (#7415)
* Fix for sub-array order resolution

* Fix small test error

* #7409 MaskZeroLayer fix

* #7407 LineRecordReader charset config

* #7394 Impvoe SDVariable.get tests

* Checks for min/max reduction on bool arrays

* Linspace: switch to using custom op linspace for import; fix failing test

* Fix failing DataVec test

* Rank 4 mmul tests

* Test fix

* Clean up flatten test
@lock

This comment has been minimized.

Copy link

commented May 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 2, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.