Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8665257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:26:15+00:00 2026-06-12T17:26:15+00:00

We’re using this script — http://jsfiddle.net/6t74T/4/ — which we learned about in this terrific

  • 0

We’re using this script — http://jsfiddle.net/6t74T/4/ — which we learned about in this terrific forum. It uses JQuery autocomplete. The script is working great for our purposes except for diacritics (accented characters). There are a lot of posts in the forum about accented characters, utf-8, etc., but this one is just a little different b/c of how we store our data. Here’s an example that illustrates our problem.

If someone adds a person’s name to our “people” table, we check the inputted string for accented characters. If there are any we change them to html entities. So “Añosa” gets changed to “A&ntilde;osa”. We don’t save the data with the accented character because a couple of other processes in our system get seriously kludged up by diacritics. When you view a page that includes this data, it displays correctly because it’s simply html. We use PHP and MySQL. Our MySQL tables are set to UTF-8, we use <meta http-equiv=”content-type” content=”text/html; charset=utf-8″ /> in the header of all pages and “accept-charset=”UTF-8″” in our form tags. All good.

But, when a name with accented characters displays in an autocomplete list, it appears with the html entities. Instead of seeing “Añosa” in the list which is what we want, we see “A&ntilde;osa”. We have tried doing a str_replace on html entities eg., str_replace(“A&ntilde;osa”, “Añosa”, $string), but this results in one of those black diamond with a question mark symbols instead of the accented character. Tried html_entity_decode – also doesn’t work. What do we have to do to get this to appear in its accented form in the autocomplete list?

Appreciate any insight, ideas, assistance! Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:26:17+00:00Added an answer on June 12, 2026 at 5:26 pm

    It sounds to me like you need to decode your names. I have updated this example to show you what I mean. You’ll notice that I have 3 “Añosa” names in the list. It sounds like you have “Añosa” in your database, so I am showing you how to decode that with jQuery. You can decode the name server-side when you are writing the names to the list if you want as well.

    I’m not a php guy, but php has a method html_entity_decode() that seems to do what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.