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

Can it support UTF-8 character? #4

Open
g8up opened this issue Dec 27, 2016 · 5 comments
Open

Can it support UTF-8 character? #4

g8up opened this issue Dec 27, 2016 · 5 comments

Comments

@g8up
Copy link

g8up commented Dec 27, 2016

like

| 业务方向      | 线人         |
|:----------|:-----------|
| 运营后台 - 销售 | 雪、鹏、丽 |
| 智能商业部     ||
@bitwiser73
Copy link
Owner

bitwiser73 commented Jan 17, 2017

I might have found a way to do this, I'll give a try soon

@bitwiser73
Copy link
Owner

bitwiser73 commented Feb 5, 2017

I tried to add support for asian characters on MTF. I have a working test which render well inside gnome-terminal but I'm still having issue with ST3. As explained in this post, some monospace characters aren't well supported yet by OSes and browsers... I will open an issue on sublimehq's github.

It's first the time I'm working with asian character set, may be you know some way to make it work ? Basically two ascii characters should have the width of one asian character (fullwidth).

Someone having the same king of issue with ST3 : https://forum.sublimetext.com/t/some-monospace-characters-are-not-rendering-as-proper-monospace/23323

st3_monospace_issue_gnome_term

st3_monospace_issue

@bitwiser73
Copy link
Owner

bitwiser73 commented Jul 8, 2017

You can find mtf.py in branch 4_cjk_font which is a standalone cli script (no need of sublime) to format md table. It should support asian characters aswell.

simple_markdown/mtf.py -h
usage: mtf.py [-h] [-i] [-m MARGIN] [-p PADDING] [-j {left,center,right}] [-c]
              [-e ENCODING]
              input_file

Format markdown tables

positional arguments:
  input_file            input file to format

optional arguments:
  -h, --help            show this help message and exit
  -i, --in-place        edit files in place
  -m MARGIN, --margin MARGIN
                        set margin
  -p PADDING, --padding PADDING
                        set padding
  -j {left,center,right}, --justify {left,center,right}
                        set default justification
  -c, --convert-cjk     Convert all characters to CJK if any is found
  -e ENCODING, --encoding ENCODING
                        set encoding

@zh-five
Copy link

zh-five commented Jan 9, 2018

I have an idea to solve this problem in sublime text3. https://github.com/zh-five/MarkdownFormat

@bitwiser73
Copy link
Owner

Thank you @zh-five , did you try the version from the version from https://github.com/bitwiser73/MarkdownTableFormatter/tree/4_cjk_font ? I am surprised ST3 seems to have better font rendering on Mac OS.

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