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

Why can not support Chinese in the .org file? #223

Closed
HaixiWu opened this Issue Jan 7, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@HaixiWu

HaixiWu commented Jan 7, 2017

I've set up the org2blog. Buf If I am using Chinese, then the .org file can't be post.

@grettke

This comment has been minimized.

Show comment
Hide comment
@grettke

grettke Jan 8, 2017

Collaborator

Wondering if the database encoding is happy: Are you able to manually make the post using the same title and same content?

Wondering what happens if you try posting it via XML RPC: Here are my notes on testing it but not dealing with posting which is what you see. However it might get you closer to an error message: #160

Collaborator

grettke commented Jan 8, 2017

Wondering if the database encoding is happy: Are you able to manually make the post using the same title and same content?

Wondering what happens if you try posting it via XML RPC: Here are my notes on testing it but not dealing with posting which is what you see. However it might get you closer to an error message: #160

@HaixiWu

This comment has been minimized.

Show comment
Hide comment
@HaixiWu

HaixiWu Jan 8, 2017

I am using utf-8. The same title and content can be post until I add only a single Chinese word in it.

I use the suggested command M-x org2blog/wp-post-buffer or C-u M-x org2blog/wp-post-buffer, but not working well with Chinese inside.

HaixiWu commented Jan 8, 2017

I am using utf-8. The same title and content can be post until I add only a single Chinese word in it.

I use the suggested command M-x org2blog/wp-post-buffer or C-u M-x org2blog/wp-post-buffer, but not working well with Chinese inside.

@grettke

This comment has been minimized.

Show comment
Hide comment
@grettke

grettke Jan 8, 2017

Collaborator

What version of Emacs?

What version of Org Mode?

What version of Org2Blog?

What is a message that we can use to reproduce it?

What is the error message?

Collaborator

grettke commented Jan 8, 2017

What version of Emacs?

What version of Org Mode?

What version of Org2Blog?

What is a message that we can use to reproduce it?

What is the error message?

@HaixiWu

This comment has been minimized.

Show comment
Hide comment
@HaixiWu

HaixiWu Jan 8, 2017

Hi @grettke ,
I am using Emacs 25.1, org mode version 8.2.10, and the latest org2blog here. I set up org2blog according to the readme and did no further changes.

For example, I can post this .org file in UTF-8, by M-x org2blog/wp-post-buffer:

#+BLOG: myblog
#+POSTID: 207
#+DATE: [2017-01-08 Sun 19:37]
#+TITLE: Hello, World
#+TAGS: 
#+CATEGORY:

Hello!

However, if I add a Chinese word like this:

#+BLOG: myblog
#+POSTID: 207
#+DATE: [2017-01-08 Sun 19:37]
#+TITLE: Hello, World
#+TAGS: 
#+CATEGORY:


Hello!你好!

then I can no longer post it.
A new buffer will show up with something like

……
     <value>
      <boolean>0</boolean>
      </value>
    </param>
  </params>
</methodCall>

The only difference between the above two cases is with or without Chinese inside, and if I delete the “你好!”(or other Chinese), everything works fine again...

Could you include a Chinese word: 中文 in your data file and see if it can be post it like usual? Thanks!

HaixiWu commented Jan 8, 2017

Hi @grettke ,
I am using Emacs 25.1, org mode version 8.2.10, and the latest org2blog here. I set up org2blog according to the readme and did no further changes.

For example, I can post this .org file in UTF-8, by M-x org2blog/wp-post-buffer:

#+BLOG: myblog
#+POSTID: 207
#+DATE: [2017-01-08 Sun 19:37]
#+TITLE: Hello, World
#+TAGS: 
#+CATEGORY:

Hello!

However, if I add a Chinese word like this:

#+BLOG: myblog
#+POSTID: 207
#+DATE: [2017-01-08 Sun 19:37]
#+TITLE: Hello, World
#+TAGS: 
#+CATEGORY:


Hello!你好!

then I can no longer post it.
A new buffer will show up with something like

……
     <value>
      <boolean>0</boolean>
      </value>
    </param>
  </params>
</methodCall>

The only difference between the above two cases is with or without Chinese inside, and if I delete the “你好!”(or other Chinese), everything works fine again...

Could you include a Chinese word: 中文 in your data file and see if it can be post it like usual? Thanks!

@HaixiWu HaixiWu referenced this issue Jan 9, 2017

Closed

No post #224

@gnohz

This comment has been minimized.

Show comment
Hide comment
@gnohz

gnohz Jan 9, 2017

Same here as @HaixiWu (and the same setup, emacs 25.1 and latest org)

I think the key error message is the following:

error in process sentinel: url-http-create-request: Multibyte text in HTTP request: POST /xmlrpc.php HTTP/1.1

I also found this by google:

http://blog.somof.net/?p=1310

(and it also happened in python mode pointed out by other posts).

gnohz commented Jan 9, 2017

Same here as @HaixiWu (and the same setup, emacs 25.1 and latest org)

I think the key error message is the following:

error in process sentinel: url-http-create-request: Multibyte text in HTTP request: POST /xmlrpc.php HTTP/1.1

I also found this by google:

http://blog.somof.net/?p=1310

(and it also happened in python mode pointed out by other posts).

@HaixiWu

This comment has been minimized.

Show comment
Hide comment
@HaixiWu

HaixiWu Jan 9, 2017

@gnohz
Thanks!
I just simply copy and paste those code into my .emacs, then the problem solved! (though I don't understand how it works)
Now I can post with Chinese without any problems!

HaixiWu commented Jan 9, 2017

@gnohz
Thanks!
I just simply copy and paste those code into my .emacs, then the problem solved! (though I don't understand how it works)
Now I can post with Chinese without any problems!

hexa00 pushed a commit to hexa00/emacs that referenced this issue Jan 9, 2017

Antoine Tremblay
Fixed org2blog posting as per:
org2blog/org2blog#223

This is a workaround, I hope a newer version of emacs fixes it...

@HaixiWu HaixiWu closed this Jan 10, 2017

@grettke

This comment has been minimized.

Show comment
Hide comment
@grettke

grettke Jan 16, 2017

Collaborator

Thank you @gnohz and @HaixiWu .

Added a TODO here

Collaborator

grettke commented Jan 16, 2017

Thank you @gnohz and @HaixiWu .

Added a TODO here

@grettke

This comment has been minimized.

Show comment
Hide comment
@grettke

grettke Jun 23, 2017

Collaborator

@gnohz It has been a while but if you can please try out his patched xml-rpc.el for your use case.
fix.zip

Collaborator

grettke commented Jun 23, 2017

@gnohz It has been a while but if you can please try out his patched xml-rpc.el for your use case.
fix.zip

@grettke

This comment has been minimized.

Show comment
Hide comment
@grettke

grettke Dec 11, 2017

Collaborator

This issue is resolved here using this patch.

Collaborator

grettke commented Dec 11, 2017

This issue is resolved here using this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment