-
Notifications
You must be signed in to change notification settings - Fork 9
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
fd#write(: Buffer) does not write #98
Comments
Just convert the Buffer to a string. All 😝 |
@schas002 however the lovely UTF16 will mangle your bytes. |
Make something that enforces a 256-character encoding on strings. (Like, a Latin1String.) Then convert the Buffer to a string with that rule enforced and you're done. 😝 |
The problem is that enforces a 256 character encoding. What if you want unicode? |
I suggested a new type. |
in "(Like, a Latin1String.)" |
That would be slow and it would be a buffer internally anyway. |
Strings are kinda like:
Meaning internally they are stored as UTF-16 |
However |
So we may go only the hard path: using rubber ducks to resolve the problem. |
Version: v1.0.5
fd#write
function when passed aBuffer
, does not write any text to the file. However when passed aString
object, it correctly writes to the fileThe text was updated successfully, but these errors were encountered: