Giter VIP home page Giter VIP logo

Comments (5)

barbushin avatar barbushin commented on September 18, 2024

For now, just try to replace mb_convert_encoding call to something like iconv('WINDOWS-1250', 'UTF-8//IGNORE', $data); and report me if it works, I'll update MultiRequest to use iconv as alternative if mb_convert_encoding not works.

from multirequest.

ncla avatar ncla commented on September 18, 2024

Tried
$this->responseContent = iconv($clientEncoding, $this->serverEncoding, $this->responseContent);
and I get
iconv(): Wrong charset, conversion fromwin-1251' to utf-8' is not allowed now.

Right now I just ended up doing this as I don't really care for the response, in my case.

try {
    $this->responseContent = mb_convert_encoding($this->responseContent, $this->serverEncoding, $clientEncoding);
} catch (\ErrorException $e) {
    $this->responseContent = "";
}

from multirequest.

barbushin avatar barbushin commented on September 18, 2024

Try to replace win-1251 with windows-1251 or cp1251.

from multirequest.

ncla avatar ncla commented on September 18, 2024

Apologies for late reply.

It seems that it did the trick, but I stumbled upon new encoding 'euc-jp' which inconv() doesn't like.

  [ErrorException]                                        
  iconv(): Detected an illegal character in input string  

from multirequest.

barbushin avatar barbushin commented on September 18, 2024

So you can check if @iconv() return false, then use mb_convert_encoding.

from multirequest.

Related Issues (8)

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.