| View previous topic :: View next topic |
| Author |
Message |
maximvelichko New Poster

Joined: 06 Feb 2008 Posts: 4  
|
Posted: Wed Feb 06, 2008 9:07 Post subject: XML-RPC and UTF-8 |
|
|
Hello
I failed to find any relevant information, and I hope this question was not discussed a million times already
I use b2evolution 2.4.0 "Venetian" and I try to submit posts using XML-RPC/metaWeblog.newPost method. Finally I managed to control it, hurrah!
However, it turns out that if string values are outside of standard ISO-8859-1 character set, they are replaced with question marks in created posts.
I even found the reason :-)
When the request is parsed in inc/_ext/xmlrpc/_xmlrpc.inc.php, the XML_OPTION_TARGET_ENCODING option is set to the internal encoding. And this encoding is hard-coded to 'ISO-8859-1', when I changed it as below, everything started working just fine:
inc/_ext/xmlrpc/_xmlrpc.inc.php
//$GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';
$GLOBALS['xmlrpc_internalencoding']='UTF-8';
The question is of course - what am I doing wrong?
Is there a better way to encode UTF-8 correctly? And what can be affected in my solution?
I can provide extra info (like my exact XML-RPC request) upon an inquiry.
Can you advise anything?
Best regards,
Maxim |
|
| Back to top |
|
 |
momokuri New Poster

Joined: 19 Nov 2005 Posts: 4
    
|
Posted: Thu Oct 16, 2008 23:43 Post subject: It may |
|
|
I also caught same problem with b2evolution 2.4.5 "Monument Valley".
I tried flikr's post service, which support Blogger API.
Characters inside ISO-8859-1 is ok but others such as Japanese is conveted to '?' question mark.
With your modification, the problem is gone.
I think recent b2evolution internal code is UTF-8 by default.
That's because, default value should be UTF-8.
These codes may be external code base but we should use it with proper configuration
Hiroshi |
|
| Back to top |
|
 |
sam2kb da ruski mafia
Joined: 02 Dec 2007 Posts: 2927
   votes: 53
|
Posted: Sat Dec 20, 2008 17:43 Post subject: |
|
|
I had the same problem with Scribefire on UTF-8 b2evo
$GLOBALS['xmlrpc_internalencoding']='UTF-8'; did the trick  _________________ Russian b2evolution | Download |
|
| Back to top |
|
 |
|