Skip to content

Decode URI encoded multibyte file names#221

Merged
parkr merged 1 commit intojekyll:masterfrom
suzukimilanpaak:bugfix/decode_uri_encoded
Nov 3, 2015
Merged

Decode URI encoded multibyte file names#221
parkr merged 1 commit intojekyll:masterfrom
suzukimilanpaak:bugfix/decode_uri_encoded

Conversation

@suzukimilanpaak
Copy link

I came across error saying a URI encoded file name is too long for a converted file name.

 ruby -rubygems -e 'require "jekyll-import";
quote>     JekyllImport::Importers::Blogger.run({
quote>       "source"                => "/Users/szkmp/Downloads/deletable/blog-10-10-2015.xml",
quote>       "no-blogger-info"       => false, # not to leave blogger-URL info (id and old URL) in the front matter
quote>       "replace-internal-link" => false, # replace internal links using the post_url liquid tag.
quote>     })'
/Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:187:in `initialize': File name too long @ rb_sysopen - _drafts/2013-01-23-%E3%83%87%E3%83%99%E3%83%AD%E3%83%83%E3%83%91%E3%81%8C%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3%E3%82%92%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E4%BE%BF%E5%88%A9%E3%81%9D%E3%81%86%E3%81%AA%E3%82%A6%E3%82%A7%E3%83%96%E3%82%B5%E3%82%A4%E3%83%88.html (Errno::ENAMETOOLONG)
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:187:in `open'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:187:in `tag_end'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rexml/parsers/streamparser.rb:28:in `parse'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:46:in `block in process'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:44:in `open'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importers/blogger.rb:44:in `process'
    from /Users/szkmp/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-import-0.8.0/lib/jekyll-import/importer.rb:23:in `run'
    from -e:2:in `<main>'

This is a fix for the error. Please review

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you meant to replace this line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opps, sorry it was a rough pull request. I fixed this

@suzukimilanpaak suzukimilanpaak force-pushed the bugfix/decode_uri_encoded branch from a767280 to 1d34a4e Compare October 13, 2015 03:01
@suzukimilanpaak
Copy link
Author

fixed code and squashed

parkr added a commit that referenced this pull request Nov 3, 2015
@parkr parkr merged commit 5368dcb into jekyll:master Nov 3, 2015
parkr added a commit that referenced this pull request Nov 3, 2015
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants