Giter Site home page Giter Site logo

python3: encoding error about clcache HOT 4 CLOSED

frerich avatar frerich commented on August 24, 2024
python3: encoding error

from clcache.

Comments (4)

webmaster128 avatar webmaster128 commented on August 24, 2024

Is this one error or two different ones? I do not yet understand at which code position the problem occurs.

Can you tell whether it is because of a special character in a source file or a file path?

from clcache.

timblechmann avatar timblechmann commented on August 24, 2024

one error ... since it only occurs when using german language, i'd assume that its a special char in the command line output of the compiler?

from clcache.

webmaster128 avatar webmaster128 commented on August 24, 2024

Okay, here we go: http://stackoverflow.com/a/33291200

Problem is that we do not know which encoding MSVC is throwing at us in STDOUT and STDERR. It is likely to be this semi-UTF-16 encoding called MBCS/DBCS (Microsoft's definition of DBCS).

It is true that 0x81 is not Windows-1251/CP-1251 because the position is empty.

So as described in the SO answer, in invokeRealCompiler() we should not use Popen with universal_newlines=True when calling communicate(). Instead we should take the plain bytes and do not convert them into strings. This is already done ObjectCache.computeKey().

from clcache.

webmaster128 avatar webmaster128 commented on August 24, 2024

I think this might help: #117

from clcache.

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.