WordPress.org

Ready to get started?Download WordPress

Forums

Xml-rpc Turkish character problem (9 posts)

  1. rhgrdyn
    Member
    Posted 4 years ago #

    Hello,
    i'm posting with xml-rpc (php). But Turkish characters not correct. I'm using this function:
    function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$category,$keywords='',$encoding='UTF-8')

    i try:
    iso-8859-9 in header (not resolved)

    Regards.

  2. Joseph Scott
    Member
    Posted 4 years ago #

    What does the actual XML look like?

  3. rhgrdyn
    Member
    Posted 4 years ago #

    Hello Joseph,
    Turkish Characters looking:

    Ş -> Þ
    ş -> þ
    Ğ -> Ð
    ğ -> ð
    ı -> ý
    İ -> Ý

    ç,ö,ü these characters seem normal.

    How can i fix the problem?
    Thank you.

  4. pagou
    Member
    Posted 4 years ago #

    try utf-8 all over the place (including database). it has works with greek.

  5. rhgrdyn
    Member
    Posted 4 years ago #

    Hello Pagou,
    Already utf-8. Normal posts does not have a problem in the Turkish characters. However, Xml-rpc posts are in the Turkish character problem. Ç Ö Ü no such problems with Turkish characters. However, a problem with character Ş ı İ Ğ p ş.

    Regards.

  6. Joseph Scott
    Member
    Posted 4 years ago #

    What does the actual XML look like? I'm talking about the raw XML that is sent over HTTP to the XML-RPC service on your blog.

  7. tyranid
    Member
    Posted 3 years ago #

    i have same problem too,
    i use UTF-8 at my every file.

    The title which i sent is looks like "Nasıl Baktığına Bağlı" but it must be "Nasıl Baktığına Bağlı". i search for days but i couldn't find any way to solve this problem.

  8. tyranid
    Member
    Posted 3 years ago #

    i solved the problem
    http://thr.gen.tr/php/xmlrpc-turkce-karakter-sorunu.html

    a comment from php.net
    "It should be noted that encoding does not seem to encode anything, just specify what goes into the XML header.

    We had problems with double-encoded UTF strings being saved to database when using this function, sending it of to a apache xml-rpc servlet and storing it in mysql database. It was solved by setting 'escaping' to just 'markup' and 'encoding' to 'UTF-8' (don't forget to set 'utf-8' in xmlrpc_decode too).

    It seems that UTF-8 encoded strings gets escaped with their bytes as entities instead of their characters as entites."

  9. antonio.duran
    Member
    Posted 3 years ago #

    Thanks tyranid.
    I started with this problem today and your post made me solve it in minutes.
    That's timing! :)

Topic Closed

This topic has been closed to new replies.

About this Topic