Global variable alert! #2
Labels
No labels
Bug
Enhancement
Feature Request
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/wrench-js#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
Nice functions, saved me the trouble of writing them myself. On the other hand, I found some issues and would like to make you aware of them. The following lines are not doing what you think (or you might just have done some naughty copy-pasting):
The last parameter in both lines are an expression that creates a global variable called "encoding", sets it to "utf8" and then passes the value of "encoding" to the function. Remove "encoding=" and just use "utf8" as a parameter instead.
By the way, setting the encoding to utf8 doesn't really work well with binary files, like images. I would just skip the encoding parameter altogether.
Cheers!
Hey,
Thanks for pointing this out! I had been meaning to circle around and fix it for months; this was abstracted out of a personal project many moons ago, and as such definitely had one or two warts since I kind of just threw it out there for people to use.
Resolved in
445a283. Thanks!