[TxMt] Re: trouble with e_url in escape.rb (TextMate 2, Mavericks, Ruby 2.x)
Allan Odgaard
mailinglist at textmate.org
Fri Jan 10 06:35:01 UTC 2014
On 10 Jan 2014, at 9:21, Matt Neuburg wrote:
> […] The problem is that the "n" modifier on the match requires that
> this string (str) be ASCII-8BIT encoding. But on the Mac a file system
> path is UTF-8. Thus it is possible that this method will be sent a
> UTF-8 string and will choke on it.
The reason we coerce the 8-bit ASCII encoding onto the source string is
to look at the “raw” bytes.
That way, your file name should be encoded as “h%C3%B6wdy.txt”.
> I suggest that this utility may need to be revised for use with
> Mavericks and Ruby 2.x.
If anyone know of a way to achieve the same with ruby 2 (that is
backwards compatible) I’ll gladly update the code.
More information about the textmate
mailing list