Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charset error #44

Open
acidbeast opened this issue Jan 25, 2014 · 5 comments
Open

charset error #44

acidbeast opened this issue Jan 25, 2014 · 5 comments
Labels

Comments

@acidbeast
Copy link

Hi i had some issues with charset in search results. (See attach) Database and database connection use 'utf-8' charset.

screen shot 2014-01-25 at 2 44 19 pm

I change line 414 in data.search.php:

$excerpt = utf8_encode($excerpt);

with:

$excerpt = iconv('UTF-8', 'UTF-8//IGNORE', $excerpt);

And now have right symbols in search results.

@nitriques
Copy link
Member

@animaux Would this be a cool thing to do ?

@nitriques nitriques added the bug label Apr 12, 2017
@animaux
Copy link
Contributor

animaux commented Apr 12, 2017

I have no idea what that line does … so I honestly don’t know.

@nitriques
Copy link
Member

Did you ever had any problems with german chars ?
See http://stackoverflow.com/questions/9499467/iconv-vs-utf8-encode
And also, not that iconv is not available on all platforms.

@animaux
Copy link
Contributor

animaux commented Apr 12, 2017

I did have some problems with url-encoding and german characters. I’m not actively using the excerpt function a lot though.

If iconv() is not widely available we could check that first and fall back to utf8_encode() if not.

I recently had a problem with XML-imported data that included UTF-ligature commands that broke processing. I wonder if this could have been avoided like this too.

However, I’m only speculation and have no real insight, so still not sure if there are any other caveats.

@nitriques
Copy link
Member

OK I'll leave open then. If you ever have similar problem, we will be able to work on it with that reproducible setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants