Jump to content

Japanese Encoding


sniperscope

Recommended Posts

hi gurus.

how can i convert japanese text into %E3%83%96%E3%83%AD%E3%82%B0%E6%A4%9C%E7%B4%A2.

in url looks normal japanese characters but if copy entire url and paste into DW all kanji characters change into above. Is this encoding. Because i am doing something which grab records from google search.

So, if i use

$SearchURL = "http://blogsearch.google.co.jp/blogsearch?hl=ja&ie=UTF-8&q=%E9%A2%A8&btnG=%E3%83%96%E3%83%AD%E3%82%B0%E6%A4%9C%E7%B4%A2&lr=lang_ja";

works exact result what i want. But if use

$SearchURL = "http://blogsearch.google.co.jp/blogsearch?hl=ja&ie=UTF-8&q=JapaneseTEXT&btnG=Japanese_Button_Name&lr=lang_ja";

then result appear totally different thing.

 

any idea how to solve this issue.

 

Regards

 

Link to comment
Share on other sites

Dear mrqpro thanks for advice but it doesn't solve my problem.

if you search something in google with japanese characters google shows correct japanese characters in URL. but if you copy and paste that url, kanji karacters transform into %E3%83 format.

ie; let's say i am searching 日本(which means Japan) and google shows

http://www.google.com/#hl=en&source=hp&q=日本&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=dfdf66882bd03aae

in the URL.

bu if you copy and paste that url transform into

http://www.google.com/#hl=en&source=hp&q=%E6%97%A5%E6%9C%AC&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=dfdf66882bd03aae

 

All i want is user input some japanese characters into text area then hit search button, my form search google with cURL. But mentioned problem always shows different result.

So, user input normal japanese character but i want to transform it into  %E6%97%A5%E6%9C%AC type format and then run cURL.

 

Hope i could make myself clear.

 

Regards

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.