1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to use the Api with special characters like ä, ö and ü?

Discussion in 'Google API' started by Jojo, Oct 2, 2004.

  1. #1
    Hello,

    I am programming an German Tool to use the Google API. I use NuSoap.

    Now I have problems with special characters, like the German letters ä, ö and ü.
    At the moment I haven´t any idea how to use them on a query in the right way. Looks like Google or NuSoap is ignoring them?

    Any idea where the mistake could be?
     
    Jojo, Oct 2, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    You shouldn't have to do anything special since the API uses UTF-8 encoding. Just make sure you pass the query as unicode.
     
    digitalpoint, Oct 2, 2004 IP
  3. Jojo

    Jojo Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Looks like I found the problem. I change this two lines and use now ISO-8859-1 instead of UTF-8.

    
    // var $soap_defencoding = 'UTF-8';
    var $soap_defencoding = 'ISO-8859-1';
    
    PHP:
    Looks like I need to programm an own Soap-Client. NuSoap seems not the best way to use the Google-API.
     
    Jojo, Oct 3, 2004 IP
  4. qll

    qll Peon

    Messages:
    195
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4

    Good finding. I am using direct none API
    http://www.google.com/search?ie=ISO-8859-1&q=sina
    http://www.google.com/search?ie=UTF-8&q=sina
    do not look much different.
     
    qll, Oct 6, 2004 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    None of the soap clients are very good actually. I ended up writing my own for the things I need it for (search engine script, keyword tracker, etc.)
     
    digitalpoint, Oct 6, 2004 IP