Skip to content
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

Not supporting CJK #35

Closed
YuMS opened this issue Jul 29, 2013 · 3 comments
Closed

Not supporting CJK #35

YuMS opened this issue Jul 29, 2013 · 3 comments

Comments

@YuMS
Copy link

YuMS commented Jul 29, 2013

When my README.md is "# hello" or "中文", the plugin works fine. But when I want to include something like "# 中文" in it. The plugin just render a white page.
I found that there' s something wrong with github-flavoredmarkdown.rb

/usr/local/lib/node_modules/instant-markdown-d/node_modules/docter/bin
% echo "# 中文" | ./github-flavored-markdown.rb
/usr/lib/ruby/1.9.1/rexml/source.rb:162:in `initialize': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
from /usr/lib/ruby/1.9.1/rexml/source.rb:17:in `new'
from /usr/lib/ruby/1.9.1/rexml/source.rb:17:in `create_from'
from /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:127:in `stream='
from /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:116:in `initialize'
from /usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `new'
from /usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `initialize'
from /usr/lib/ruby/1.9.1/rexml/document.rb:243:in `new'
from /usr/lib/ruby/1.9.1/rexml/document.rb:243:in `build'
from /usr/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
from ./github-flavored-markdown.rb:62:in `new'
from ./github-flavored-markdown.rb:62:in `header'
from ./github-flavored-markdown.rb:99:in `render'
from ./github-flavored-markdown.rb:99:in `fromMarkdown'
from ./github-flavored-markdown.rb:103:in `<main>'
@xinleibird
Copy link

I have a same error with chinese language heading.
For example, wen i used

# 中文

or

中文
====

or other heading

That the page became white.

Wrong messages:


echo "# 中文" | ./github-flavored-markdown.rb
/usr/lib/ruby/1.9.1/rexml/source.rb:162:in `initialize': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    from /usr/lib/ruby/1.9.1/rexml/source.rb:17:in `new'
    from /usr/lib/ruby/1.9.1/rexml/source.rb:17:in `create_from'
    from /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:139:in `stream='
    from /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:116:in `initialize'
    from /usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `new'
    from /usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:9:in `initialize'
    from /usr/lib/ruby/1.9.1/rexml/document.rb:243:in `new'
    from /usr/lib/ruby/1.9.1/rexml/document.rb:243:in `build'
    from /usr/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
    from ./github-flavored-markdown.rb:62:in `new'
    from ./github-flavored-markdown.rb:62:in `header'
    from ./github-flavored-markdown.rb:99:in `render'
    from ./github-flavored-markdown.rb:99:in `fromMarkdown'
    from ./github-flavored-markdown.rb:103:in `<main>'

@suan
Copy link
Collaborator

suan commented Nov 1, 2013

Hmmmm, when I do echo "# 中文" | ./github-flavored-markdown.rb it actually works - I've tried it in both Ruby 1.8.7 and 2.0. Maybe try upgrading to the latest versions of things? Also, maybe something is causing your Ruby default encoding to not be UTF-8?

@xinleibird
Copy link

When i update rbenv and rebuild ruby, it's works so fine. Thanks for your help!

发自我的小米手机

suan notifications@github.com编写:

Hmmmm, when I do echo "# 中文" | ./github-flavored-markdown.rb it actually works - I've tried it in both Ruby 1.8.7 and 2.0. Maybe try upgrading to the latest versions of things? Also, maybe something is causing your Ruby default encoding to not be UTF-8?


Reply to this email directly or view it on GitHub.

@suan suan closed this as completed Nov 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants