jQuery Autocomplete with Special Characters (i.e. ö, Ä, é, or ß)

后端 未结 3 1318
旧巷少年郎
旧巷少年郎 2021-01-19 18:50

How can I have autocomplete match on words with special characters, such as those in German: ö, Ä, é, or ß. For example, I\'d like \"mun\" to match \"München\" and \"Munchen

3条回答
  •  太阳男子
    2021-01-19 19:04

    I use typeahead, and after hours of banging my head against a wall it was as simple as using utf8_encode on the script that returns the JSON:

    utf8_encode(stripslashes($variable));

提交回复
热议问题