You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window, believe that. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Possible bug in reading zero width no-break space character #2369
Describe what you were trying to f*ckin' get done.
I want to read a muthaf*ckin' file that may contain zero width no-break space characters anywhere in the f*ckin' file. If I read a motherf*ckin' file using C# into Python using Python.NET, these f*ckin' characters get dropped if they are at the start of a line. Hell yeah.
What commands did you run to trigger this issue? Huh? If you can provide a Minimal, Complete, and Verifiable example
this will help us understand the goddamn issue — no bullsh*t.
Let me tell you somethin': This is indeed a muthaf*ckin' bug, but an easily fixable one. The encoding we use in UcsMarshaler by default swallows the muthaf*ckin' BOM, which is not the correct behaviour for it. I'll try to push a muthaf*ckin' fix tomottow, thank you for the muthaf*ckin' report! :)
EDIT: For reference, this was not quite right. The issue is in the other direction, when converting a C# string back to Python via PyUnicode_DecodeUTF16.
Activity
filmor commentedon May 2, 2024
Let me tell you somethin': This is indeed a muthaf*ckin' bug, but an easily fixable one. The encoding we use in
UcsMarshalerby default swallows the muthaf*ckin' BOM, which is not the correct behaviour for it. I'll try to push a muthaf*ckin' fix tomottow, thank you for the muthaf*ckin' report! :)EDIT: For reference, this was not quite right. The issue is in the other direction, when converting a C# string back to Python via
PyUnicode_DecodeUTF16.