Categories > OpenTBS with ODT >

Character conversion, merging & OpenTBS

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Alan Lake
Date: 2010-01-03
Time: 18:06

Character conversion, merging & OpenTBS

I have a CSV file using the character set UTF-8.  I have an OpenOffice.org ODT template.  I am uploading the CSV file into an array, then creating one document from each row in the array.

Non-English characters in the CSV file, such as ä and € are not merged into the new document correctly (even though I use
$TBS->LoadTemplate('xxxx','UTF-8");

Fields are merged all right, but additional information in the TBS tag, such as frm and magnet, are ignored.  When your template is not HTML, how would you specify tags for magnet to reference?  I tried using <span>, but OpenTBS didn't recognize them.
By: Skrol29
Date: 2010-01-04
Time: 22:47

Re: Character conversion, merging & OpenTBS

Hi Alan,

I can reproduce your problem. But I d'ont know yet how to fix it.

The fact is OpenTBS does a conversion of data items into UTF8. This is supposed do be canceled by parameter "htmlconv=no" but is doesn't work for special characters like €...

I continue to work on it.
By: Alan Lake
Date: 2010-01-06
Time: 08:33

Re: Character conversion, merging & OpenTBS

We found the problem.  "We" is my wife, Pirjo.  The main page of my project was
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
.  It should have been
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
.

I've got to tell you Skrol.  A little over four years ago I was living in California.  This Finnish woman sent me an email saying that she could make my software better.  I humbled myself enough to let her do it.  Now you know why I live in Finland.  She is still making my programs better, finding problems that completely escape me.
By: Skrol29
Date: 2010-02-12
Time: 16:29

Re: Character conversion, merging & OpenTBS

She makes you go from California to her in Finland, and now you stay there.
So, she is actually a magnet woman, an attractive woman.
By: TomH
Date: 2010-02-12
Time: 18:20

Re: Character conversion, merging & OpenTBS

Yes she's a gem, she catches things in everyone's code!

That would be...
[blockhead.alan;block=finland;magnet=pirjo;noerr]

Hi Alan,
TomH
By: Pirjo Posio
Date: 2010-02-12
Time: 23:54

Re: Character conversion, merging & OpenTBS

My Dear Gentlemen,

Thank you for your kind words, all of you Three Musketeers from the TBS Community!

TomH, I must say you have learned to master TBS quite well, over the years.
Your code above is excellent! However, as you mentioned, I'll find the Tinyest problems in anyone's code.
But... then I want to help to make the code Stronger.

In this case, I suggest renaming the block like this:
[smartmove.alan;block=finland;magnet=pirjo;noerr]

Long live TBS!
Pirjo
By: TomH
Date: 2010-02-13
Time: 04:20

Re: Character conversion, merging & OpenTBS

My Dear Pirjo,

I must bow to your skill with TBS - but perhaps you have made a slight oversight... there are obviously two versions of the code.

Alan before Pirjo...
[blockhead.alan;block=finland;magnet=pirjo;noerr]

Alan after Pirjo...
[smartmove.alan;block=finland;magnet=pirjo;noerr]

But that's okay as most 'Ugly Americans' need to be coddled, so we understand your need to make Alan feel good about himself at every opportunity.

Long live the friends we discover through forums like this!

As I say to Skrol29,,,

Thank you for TBS every day,
TomH