0

On my site i'm trying to get different character support for the searches, for example hebrew so something like

אייל גולן

but the thing is, when they make the search it's stored in the database like

#1488;#1497;#1497;#1500; #1490;#1493;#1500;#1503;

What should i do? Is there any way to convert that back to readable hebrew text? or should i find a way to store in the db properly.

Thanks

1
  • If possible, you shouldn't be storing hebrew characters like that: Using UTF-8 as the database table encoding, and using native characters would be better. Why are they going into the database like that? At which point are they turned into HTML entities? Commented Apr 17, 2011 at 18:32

2 Answers 2

2

Well, I wouldn't suggest going down to html_entity_decode(). I would use it as last solution. Make your page and database UTF-8 (character set and file if necessary).

Later if you are using any php built-in functions for html characters, make sure they allow UTF8 also.

This will make you code less and give you less headache.

Sign up to request clarification or add additional context in comments.

Comments

0

html_entity_decode() could help you out.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.