Skip to content

Encode conversion support #130

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

Closed
wants to merge 2 commits into from
Closed

Conversation

lymslive
Copy link

  1. convert encode using iconv lib, but only in linux
  2. unit test
  3. minor fix csv.h without change the layout of Reader classes.

@ben-strasser
Copy link
Owner

ben-strasser commented Dec 23, 2021

Thank you for the PR. However, I do not want to merge PRs that introduce new dependencies. That will break too many existing users.

I also do not really understand what you are trying to do. Apparently, you have files in GBK and EUC-JP encoding and want to read these. According to Wikipedia, they consistent with the 7 bit ASCII values. This means that to the best of my understanding

int main(){
  io::CSVReader<3> in("ram.csv");
  in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
  char* encoded_vendor; int size; double speed;
  while(in.read_row(encoded_vendor, size, speed)){
    // vendor is GBK/EUC-JP encoded
    std::string vendor = my_decode(encoded_vector);
  }
}

should just work.

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

Successfully merging this pull request may close these issues.

2 participants