等特殊字符時,我們在我們的網站上安裝了自定義搜索引擎。
它工作正常,直到我們嘗試搜索加重字母。
由於該網站是在法國,它有點需要工作...Google CSE:當我搜索「é」
所以,如果我搜索: - 「!poupee」
「poupee」工作正常 - 也可以正常工作 「poupée」 - 不起作用。實際調用上谷歌搜索甚至沒有叫
你可以在這裏進行測試:
poupée - 不工作:
http://www.ckoi.com/recherche.php?q=poup%E9e&sa=&cx=012997159615660210985%3Ask7xitg5ylq&cof=FORID%3A11&ie=ISO-8859-15&oe=ISO-8859-1&siteurl=www.ckoi.com%2F&ref=&ss=1994j797008j8
而定製引擎已被設置爲法語。
-----編輯: 下面是HTML形式,我會切換回ISO-8859-1(我的網站的編碼)
<div class="search-form">
<form class="search-wrapper cf" action="/recherche.php" id="cse-search-box">
<input type="text" placeholder="Rechercher des extraits audio, articles..." name="q" />
<button type="submit" class="search-button" name="sa"><i class="icon ion-search"></i></button>
<input type="hidden" name="cx" value="012997159615660210985:sk7xitg5ylq" />
<input type="hidden" name="cof" value="FORID:11" />
<input type="hidden" name="ie" value="ISO-8859-1" original_value="ISO-8859-1" /> <!--value="ISO-8859-15"-->
<input type="hidden" name="oe" value="ISO-8859-1" original_value="ISO-8859-1" /><!--value="ISO-8859-1"-->
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=fr"></script>
</div>
任何人都知道我需要做什麼?
該代碼頁可能是問題。即ie參數指向latin-9,而oe指向latin-1。不知道他們做了什麼,但我會用utf-8替換它。 – rekire 2014-12-05 22:18:00
感謝您的回覆。 我試着改變行ie和oe: 但結果不顯示。 而且我們通常在頁面上使用ISO-8859-1作爲編碼。 – ether 2014-12-08 18:07:11
您還需要更改頁面本身的編碼。例如。與元標記。 – rekire 2014-12-08 18:08:49