Categories > TinyButStrong general >

Store / Show articles.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2005-05-21
Time: 23:32

Store / Show articles.

Hi. I store articles in Mysql with
<p><h1><h2>
tags only, into a longtext record, and inside have characters in spanish like á é í ó ú . If i use htmlconv=no the article show fine in the screen but in the source code show á not
&aacute;
and if i use htmlconv=yes in the screen show fine á and in source too, but show in the screen this tags <h1><h2>. How can i fix ? I think replace function a,
&aacute;
bla bla bla....
By: Skrol29
Date: 2005-05-23
Time: 02:22

Re: Store / Show articles.

Hi Martin,

What you need is to convert some speical characters into Html, but not all. So you're right when you say you have to code your own converting function. then you can use it with parameter 'onformat'.

But do you really need to converts those special characters ?
Maybe if you don't define a specific charsset on your Htaml page, then those spanish characters should be displayed correctly.
By: RwD
Date: 2005-05-27
Time: 09:32

Re: Store / Show articles.

Just asking:

For displaying purposes isn't it mor desirable to have the entities in rather than the actual characters. All modern browsers now how to handle them when you also specify the character set as it is required by w3 specifications. I usually use the following decalration which works fine for most european characters, but you could basically use any definition even UTF-8.

<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">