Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
文字化けについて
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
akihikotype.a  
View profile   Translate to Translated (View Original)
 More options Sep 17 2010, 5:13 am
From: "akihikotype.a" <akihikotyp...@gmail.com>
Date: Fri, 17 Sep 2010 02:13:55 -0700 (PDT)
Local: Fri, Sep 17 2010 5:13 am
Subject: 文字化けについて
下記のようなソースコードで、
winxpのxampp環境で、htmlはshift-jis CR+LFで保存しました。

やっていることは、googleの検索ボックスになります。
googleminiでも同様の現象が発生しました。

googleがUTFであるに対して、
こちらの環境はshift-jisであるせいか、
googleにいったときに、文字化けしてしまいます。

htmlはshift-jisでありながら、google検索(UTF8)を共存させる方法はないでしょうか。

<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<script type="text/javascript">
var DOMAIN='www.yahoo.co.jp';
function searchInSite(F){
        F.q.value='site:' + DOMAIN + " " + F.q.value;

}

function searchSpecial(F){
        F.q.value=F.operator.options[F.operator.selectedIndex].value +
F.q.value;
}

</script>
</head>
<body>
<!-- あ(MOJIBAKE TAISAKU) -->
<p>通常版</p>
<form onSubmit ="searchInSite(this)" action="http://www.google.co.jp/
search">
<input type="hidden" name="hl" value="ja">
<input type="hidden" name="ie" value="UTF-8">
<input type="hidden" name="oe" value="UTF-8">
<input type="text" name="q" size="31">
<input type="submit" value="検索">
</form>

<p>スペシャル版</p>
<form name="myForm" onSubmit ="searchSpecial(document.myForm)"
action="http://www.google.co.jp/search">
<input type="hidden" name="hl" value="ja">
<input type="hidden" name="ie" value="UTF-8">
<input type="hidden" name="oe" value="UTF-8">

<input type="text" name="q" size="31">
<select name="operator"
        <option value="site:">サイト内検索</option>
        <option value="link:">リンク検索</option>
        <option value="related:">関連ページ検索</option>
        <option value="会社情報 ">会社情報検索</option>
        <option value="英和 ">英和辞典検索</option>
        <option value="和英 ">和英辞典検索</option>
</select>
<input type="submit" value="検索">
</form>

</body>
</html>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nakano @websol  
View profile   Translate to Translated (View Original)
 More options Sep 28 2010, 1:15 am
From: "nakano @websol" <nakano7...@gmail.com>
Date: Tue, 28 Sep 2010 14:15:14 +0900
Local: Tues, Sep 28 2010 1:15 am
Subject: Re: 文字化けについて

はじめまして、
・htmlはshift-jisでありながら
・<input type="hidden" name="ie" value="UTF-8">
上記の2点では文字化の発生を防ぐことは無理です。

回避策としては、
・検索APIを構築する(Shift_JISで検索されたクエリをUTF-8に変換してからGSAに送信)
・<input type="hidden" name="ie" value="Shift_JIS">にする

いかがでしょうか?
2010年9月17日18:13 akihikotype.a <akihikotyp...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »