Giter Site home page Giter Site logo

Comments (6)

jasonmokk avatar jasonmokk commented on June 6, 2024 1

@LiangliangSui Thanks for bringing that up, can I submit another PR to correct that/add unit tests? I also think it would be optimal to have the ASCII check early and just directly return a UTF-8 encoded MetaString.

from incubator-fury.

jasonmokk avatar jasonmokk commented on June 6, 2024

Hi @chaokunyang I'd like to contribute to Apache Fury, can you please assign this issue to me?

from incubator-fury.

LiangliangSui avatar LiangliangSui commented on June 6, 2024

Great! thanks for the willingness to contribute to Fury.

from incubator-fury.

LiangliangSui avatar LiangliangSui commented on June 6, 2024
// org/apache/fury/meta/MetaStringEncoder.java
public MetaString encode(String input) {
  if (input.isEmpty()) {
    return new MetaString(input, Encoding.UTF_8, specialChar1, specialChar2, new byte[0]);
  }
  Encoding encoding = computeEncoding(input);
  return encode(input, encoding);
}

Could we judge here whether the input is all ASCII encoded? If not, just return UTF-8 encoded MetaString directly, so that we can save time on computeEncoding and encode.

WDYT @chaokunyang

from incubator-fury.

LiangliangSui avatar LiangliangSui commented on June 6, 2024

In addition, we also need to add unit tests to cover this issue

from incubator-fury.

LiangliangSui avatar LiangliangSui commented on June 6, 2024

can I submit another PR to correct that/add unit tests?

Sure, that is great!

from incubator-fury.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.