How to encode for articles before save it to database

Asked by adam

hello
I have trouble with font.
can you show me how to set encoding UNICODE font for articles before save it to database.

Question information

Language:
English Edit question
Status:
Solved
For:
phpns Edit question
Assignee:
No assignee Edit question
Solved by:
alecwh
Solved:
Last query:
Last reply:
Revision history for this message
Best alecwh (alecwh) said :
#1

I'm not sure if that's possible, but I might just be misunderstanding
your question.

Phpns doesn't support changing the character encoding for the text - I
honestly don't know what it is in by default. Probably UTF-8. My
question is, why would you want to? What's wrong with the default?

Anyway, you would have to do it manually, phpns doesn't support that
feature.

Revision history for this message
adam (myadam) said :
#2

Because phpns used TinyMCE for editor, so when you format article_text or insert images from TinyMCE then it always save in database with your HTML Tags and text.

example if see in database:

----------
<p align="justify">
<img src="upload/images/03_copy_400.jpg" alt="03_copy_400" width="159" height="111" align="left" />It's such grief and aggravation," said Frederick Smalls, an insurance
broker in Whitman, Massachusetts, after spending two hours on the phone
with Apple and AT&T Inc., trying to get his new iPhone to work.
</p>
<div align="justify">
</div>
<p align="justify">
In stores, people waited at counters to get the phones activated, as
lines built behind them. Many of the customers had already camped out
for several hours in line to become among the first with the new phone
</p>
------------

then if your search keyword equal "align=" it will be return result is true (FOUND)
but it's HTML tag for formated the article.

Revision history for this message
adam (myadam) said :
#3

Thanks alecwh, that solved my question.